-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't query on content type from Elasticsearch and sample is wrong #17185
Comments
@Skrypt do you perhaps have some tip? |
Maybe related with merging Elastic.Clients.Elasticsearch library recently? Also, try removing the .keyword in the end of your field names. Maybe it got removed from that PR. Best way to know is to inspect the index with the Elasticsearch web UI. |
@Piedone I think it may be a bug in the new Elasticsearch.Net library. Try this instead
I reporting this bug elastic/elasticsearch-net#8432 to see what they come back with. |
We triaged this issue and set the milestone according to the priority we think is appropriate (see the docs on how we triage and prioritize issues). This indicates when the core team may start working on it. However, if you'd like to contribute, we'd warmly welcome you to do that anytime. See our guide on contributions here. |
The ContentType field must be set to be indexed as a keyword from memory so that we have a .keyword name on the field to search. We need to see if this is a change in ES 8. Else, I will need to analyze this and see what is happening. |
@Skrypt I think you may have missed my last comment |
Yeah, the issue here is that our Lucene implementation supports the short form in our Lucene TermQueryProvider. Also .keyword should work unless they changed that too. |
Commit bb7359e, slightly before #17027, works with the original query.
This query indeed works. |
Describe the bug
I can't seem to create an Elasticsearch query that filters on content type. The
RecentBlogPosts
query in TheBlog theme's recipe, as well as all the samples in the documentation are broken too.Orchard Core version
Latest
main
(238ed0e). This used to work in 1.8.x.To Reproduce
RecentBlogPosts
Query. Notice that its "Query" textbox is empty. This is bug 1.Using these variations doesn't return any items either:
They field is correctly mapped (as a keyword):
Keyword search from under /Search still works.
Expected behavior
The Query from the recipe should work. Also, samples like the ones under https://docs.orchardcore.net/en/latest/guides/query-content-items-based-on-taxonomy/ should also work (they're for Lucene, but this is supposed to work the same).
Logs and screenshots
The text was updated successfully, but these errors were encountered: