The problem I am facing is this should be returning results and in the back office searcher is however I think there may be a bug in the Umbraco helpers as my query when compiled is being converted to the following:
{+parentId:1 +nodeTypeAlias:countryimages}
This is obviously incorrect as I have clearly specified -1 above.
Could someone tell me the best way to force this value to be negative?
Unfortunately, that was the first thing I tried and when it is run in code it seems to ignore the escape character and still processes this as 1. I therefore had to revert to using the raw lucene query methods where I built my query up in a string and then passed it into the searcher.
Examine helpers converting negative numbers to positive
Hi all,
I am currently building an examine query in Umbraco based upon a media index I have created in Umbraco.
My query is built as follows:
The problem I am facing is this should be returning results and in the back office searcher is however I think there may be a bug in the Umbraco helpers as my query when compiled is being converted to the following:
This is obviously incorrect as I have clearly specified -1 above.
Could someone tell me the best way to force this value to be negative?
To be honest, I haven't tried this, so it might not work, but I'm hopeful. Try escaping the
-1
, soI believe that the
-
symbol tells lucene to exclude some values. Check out this raw lucene query tutorialIn the Examine Management dashboard on one of our dev sites, I tried running this query as a lucene search and had errors:
But I got the expected results when I ran this query:
Hi Mark,
Unfortunately, that was the first thing I tried and when it is run in code it seems to ignore the escape character and still processes this as 1. I therefore had to revert to using the raw lucene query methods where I built my query up in a string and then passed it into the searcher.
Cheers,
Jason
is working on a reply...