I am having an issue with v7.7.0 performing an Examine search.
Here is a sample of the Range query:
queryNodes = queryNodes.And().Range("createDate", Convert.ToDateTime(model.FromDate), DateTime.Now);
The generated lucence query does not include the "+" before this, so it isn't filtering as expected. Here is the lucene query:
(-umbracoNaviHide:1) createDate:[20110223165338441 TO 20110225165338441]
(returns all results)
If I manually add the "+" in Luke, I get the expected results:
(-umbracoNaviHide:1) +createDate:[20110223165338441 TO 20110225165338441]
(returns the expected 5 results)
When using "And" for other types of queries (other than Range), the "+" sign is added as expected.
Examine And() does not work for Range
Greetings all,
I am having an issue with v7.7.0 performing an Examine search.
Here is a sample of the Range query: queryNodes = queryNodes.And().Range("createDate", Convert.ToDateTime(model.FromDate), DateTime.Now);
The generated lucence query does not include the "+" before this, so it isn't filtering as expected. Here is the lucene query: (-umbracoNaviHide:1) createDate:[20110223165338441 TO 20110225165338441]
(returns all results)
If I manually add the "+" in Luke, I get the expected results: (-umbracoNaviHide:1) +createDate:[20110223165338441 TO 20110225165338441]
(returns the expected 5 results)
When using "And" for other types of queries (other than Range), the "+" sign is added as expected.
Any thoughts?
Cheers
Cliff
Answering my own question... (at least this was my fix)
I changed: ISearchCriteria searchCriteria = ExamineManager.Instance.CreateSearchCriteria(BooleanOperation.Or);
to
ISearchCriteria searchCriteria = ExamineManager.Instance.CreateSearchCriteria(BooleanOperation.And);
And the "+" sign is now added for my Range searches.
Cheers
is working on a reply...