-
Notifications
You must be signed in to change notification settings - Fork 5
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
ContentPicker and MultinodePicker give no searchresults when startnode is set #17
Comments
hi @mcl-sz, |
I did some more research and figured out that the "-1" in the Lucene query is causing the problem so that no results can be found. When I replace -1 to *, results are found: I only have basic knowledge of Lucene queries. Is -1 a special or an invalid value to use in a query? |
It looks like the minus-character is causing the trouble. When the minus-character is removed, the query gives results as well: |
@mcl-sz thanks for input, will look into over weekend! :) |
Thanks @bielu! For now I have solved it quick and dirty by using a regular expression to escape all negative numbers in the query with a slash. Novicell.Examine.ElasticSearch/source/Novicell.Examine.ElasticSearch/ElasticSearchSearchResults.cs Line 99 in d9bcd25
This may not be the best solution, but for now it works for us. If you later have time to look for a better solution, that would be nice, but for now our problem has been solved with this. |
@mcl-sz we can't do that :), as you can have - as sign something should be not included :) |
That true, as i said it's not the best solution but it now only escapes negative numbers, other query components with a - sign are not affected by this. It's just more a quick fix for us at the moment :) We've included the source in our project, we don't use the NuGet package. Therefore it is not necessary for us to update your NuGet build. It was more to indicate that this will (temporarily) fix the problem for us and that you can look for a better solution when you have the time. |
@mcl-sz I looked into that issue already 2 times and hmmmm tricky one :) as it looks like umbraco returns incorrect lucene query :) |
Hi @bielu , unfortunately this doesn't work for us yet. I have removed the old indexes so that new ones are created on start. The indexes are filled but do not find any results when the start node is set. |
@mcl-sz ok i looked more deeply into that look like that is handled magicly inside of lucene.net even if that is incorrect lucene query. :) will look how to resolve that :) |
@bielu something wierd is happening when the query is passed to |
@mcl-sz and later examine is operating on not escaped values, so wtf :) need go more deeply |
Hi @bielu ,
One of our users noticed that the searchbox in the contentpicker en multinodepicker doesn't give any results when Novicell.ElasticSearch is used for searching.
We've investigated this with a clean StarterKit installation of Umbraco 8.10.2. The "Home"-node has an "Call To Action Link" property which uses the ContentPicker editor. We found out that no items can be found when a startnode is set in the configuration of the picker. If the startnode is not specified, the search works fine.
Both pickers do an API call to /umbraco/backoffice/UmbracoApi/Entity/Search, for example https://localhost:44351/umbraco/backoffice/UmbracoApi/Entity/Search?query=p&type=Document&searchFrom=umb://document/ca4249ed2b234337b52263cabe5587d1&dataTypeKey=3ece86aa-61ad-45d5-b1dd-8f02f25df949. When the "searchFrom" parameter is removed or set to "-1" the search gives results, otherwise it won't.
With startnode specified
Without startnode specified
We've tried to debug the reason why the searchFrom gives no results. It looks like the nodeId (-1,1104) is set in the Lucene query but for some reason it's not giving any results.
Could you please help us?
The text was updated successfully, but these errors were encountered: