Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi
When building examine queries I often use Luke to test queries. For the first time I need to search on integer values and the queries are working via Examine but not in Luke. Does anyone have any idea why this may be?
For example this query works ok:
searcher.CreateQuery().RangeQuery<int>(fields, 4, 4, true, true)
Raw query logs to:
{ Category: , LuceneQuery: +(status:[4 TO 4]) }
However if I run it direct Luke I get no results (same StandardAnalyzer):
+(status:[4 TO 4])
Running umbraco 8. Custom index on data from a database, StandardAnalyzer.
Fields defined as integers:
new FieldDefinition("status", FieldDefinitionTypes.Integer),
Any thoughts appreciated
Answer found:
https://stackoverflow.com/questions/45516870/apache-lucene-6-queryparser-range-query-is-not-working-with-intpoint
Seems you simply can't run a numeric raw query as it always searches for terms. Shame as it would be really handy for testing/building queries.
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Examine - searching Luke for integers
Hi
When building examine queries I often use Luke to test queries. For the first time I need to search on integer values and the queries are working via Examine but not in Luke. Does anyone have any idea why this may be?
For example this query works ok:
Raw query logs to:
However if I run it direct Luke I get no results (same StandardAnalyzer):
Running umbraco 8. Custom index on data from a database, StandardAnalyzer.
Fields defined as integers:
Any thoughts appreciated
Answer found:
https://stackoverflow.com/questions/45516870/apache-lucene-6-queryparser-range-query-is-not-working-with-intpoint
Seems you simply can't run a numeric raw query as it always searches for terms. Shame as it would be really handy for testing/building queries.
is working on a reply...