Describe the bug
I am migrating our app from vue 2 to vue 3, so also need to migrate appbase. there is is migration docs which we following. everything seems work but when we filter it gives this error
bugsnag.js:2688 {"settings":{"took":6,"searchTook":2},"SearchResults":{"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"Text fields are not optimised for operations that require per-document field data like aggregations and sorting, so these operations are disabled by default. Please use a keyword field instead. Alternatively, set fielddata=true on [email] in order to load field data by uninverting the inverted index. Note that this can use significant memory."}],"type":"search_phase_execution_exception","reason":"all shards failed","phase":"query","grouped":true,"failed_shards":[{"shard":0,"index":"4760d3c8-ab04-450d-b83c-83ff9bdc1d0d","node":"Fa2quZrSSlCuIwgA2TZRVg","reason":{"type":"illegal_argument_exception","reason":"Text fields are not optimised for operations that require per-document field data like aggregations and sorting, so these operations are disabled by default. Please use a keyword field instead. Alternatively, set fielddata=true on [email] in order to load field data by uninverting the inverted index. Note that this can use significant memory."}}],"caused_by":{"type":"illegal_argument_exception","reason":"Text fields are not optimised for operations that require per-document field data like aggregations and sorting, so these operations are disabled by default. Please use a keyword field instead. Alternatively, set fielddata=true on [email] in order to load field data by uninverting the inverted index. Note that this can use significant memory.","caused_by":{"type":"illegal_argument_exception","reason":"Text fields are not optimised for operations that require per-document field data like aggregations and sorting, so these operations are disabled by default. Please use a keyword field instead. Alternatively, set fielddata=true on [email] in order to load field data by uninverting the inverted index. Note that this can use significant memory."}}},"status":400}}
console.<computed> @ bugsnag.js:2688
handleError @ utils.js:1
eval @ query.js:1
Desktop (please complete the following information):
Register attendees for your event and control access for each user. Registrants will automatically be sent email
notifications once added, so confirm your email schedule before uploading registrants.
@deepak-sisodiya Based on the error message, the references for the use of the email field for either sorting or aggregations on the searchResults componentId. The code snippet you've shared looks fine to me, as I see that you're using email.keyword there. Perhaps narrow it down further based on the error message you see. You can try removing the component in question or sortOptions values to see if they help.
And for the searching use-case error, can you share the exact error message?
Affected Projects Vue.JS
Library Version: x.y.z "@appbaseio/reactivesearch-vue": "3.1.0-alpha.1",
Describe the bug I am migrating our app from vue 2 to vue 3, so also need to migrate appbase. there is is migration docs which we following. everything seems work but when we filter it gives this error
Desktop (please complete the following information):
Browser [e.g. chrome]
here is my component code
on searching also, I am getting same error
It seems something is wrong with dataField type in MultiList. Use
role.keyword
instead ofrole
and see if the error goes away. Also you should usesearch-box
instead ofdata-search
inv3
. Refer migration guide for other changes.Also can you check by removing sortOptions key passed to ReactiveList, so we can just know the root cause if above doesn't work.
@deepak-sisodiya Based on the error message, the references for the use of the
email
field for either sorting or aggregations on thesearchResults
componentId. The code snippet you've shared looks fine to me, as I see that you're usingemail.keyword
there. Perhaps narrow it down further based on the error message you see. You can try removing the component in question or sortOptions values to see if they help.And for the searching use-case error, can you share the exact error message?
@SavvyShah @siddharthlatest Thanks for the reply. I switched to other things in between. today I checked it.
Here is the update.
New issues
error is - Cannot read properties of undefined (reading 'currentPageState').
Please help @SavvyShah @siddharthlatest
@deepak-sisodiya Thanks for the update, glad to see that you got the search UI working.
On the new issues, would you be able to reproduce these two issues with one of our public demos?
@siddharthlatest where is public demo link?
@siddharthlatest @SavvyShah I have refresh button outside of table, how can I set the setPage, is there any way for it.
on refresh, I want to set page to 1
@deepak-sisodiya For the public demo, you can use this: https://codesandbox.io/s/github/appbaseio/vue-quick-start/tree/step-5/?from-embed (It has searchbox and reactive list). See if you can reproduce the issue by including sort options and the page operation
@siddharthlatest
we do not have sorting UI now. If we have sortOptions again, other things do not work. this is fixed by removing dataField and passing sortOptions
following code is not working for refresh list I changed the logic for it, seems working
thanks