Query non text fields
matteogrolla opened this issue · 2 comments
It's not clear to me how to query non text fields, ex an int field.
Could you make an example or a test about it?
Hi, the default lucene query parser doesn't handle numeric fields, unfortunately, mainly because lucene is schemaless and it's not possible to detect old-style numeric fields just from index data.
You can override QueryParser#newTermQuery() and QueryParser#newRangeQuery() to correctly deal with old-style numerics or new-style points, depending on your own schema information - the solr and elasticsearch query parsers do this, and they're a good place to look for examples.
Thank you so much Alan
Il 07 nov 2016 10:42 AM, "Alan Woodward" notifications@github.com ha
scritto:
Hi, the default lucene query parser doesn't handle numeric fields,
unfortunately, mainly because lucene is schemaless and it's not possible to
detect old-style numeric fields just from index data.You can override QueryParser#newTermQuery() and
QueryParser#newRangeQuery() to correctly deal with old-style numerics or
new-style points, depending on your own schema information - the solr and
elasticsearch query parsers do this, and they're a good place to look for
examples.—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#104 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABEJLIrqGHbABO_G57Wqa3xJG924Fm9Oks5q7vJvgaJpZM4Kq-Wd
.