Aurélien MAZOYER
2018-09-21 12:57:52 UTC
Hi,
We would like to know if there is a way to test a query against a document
without creating an index. We were thinking that maybe we could use lucene
highlighter component
to achieve this, but it seems it doesn't work as expected with complex
queries.
For example, we create a SpanQuery (+spanFirst(field:saint, 1)
+spanNear([field:saint, field:quentin], 0, true)) and we tested it against
two documents :
D1={field=eglise saint quentin}
D2={field=saint quentin deladadoupa}
We expect to get these entries from the highlighter :
D1 eglise saint quentin
D2 <B>saint</B> <B>quentin</B> deladadoupa
But we got
eglise <B>saint</B> <B>quentin</B> for D1, which is unexpected from our
perspective because it doesn't match our SpanQuery.
Do you have any ideas if this approach is correct or if we better use some
other way to achieve this functionality.
FYI we use Lucene 6.5.1.
Thank you for your help,
Regards,
Aurelien and Andrey
Tchiota GMBH
We would like to know if there is a way to test a query against a document
without creating an index. We were thinking that maybe we could use lucene
highlighter component
to achieve this, but it seems it doesn't work as expected with complex
queries.
For example, we create a SpanQuery (+spanFirst(field:saint, 1)
+spanNear([field:saint, field:quentin], 0, true)) and we tested it against
two documents :
D1={field=eglise saint quentin}
D2={field=saint quentin deladadoupa}
We expect to get these entries from the highlighter :
D1 eglise saint quentin
D2 <B>saint</B> <B>quentin</B> deladadoupa
But we got
eglise <B>saint</B> <B>quentin</B> for D1, which is unexpected from our
perspective because it doesn't match our SpanQuery.
Do you have any ideas if this approach is correct or if we better use some
other way to achieve this functionality.
FYI we use Lucene 6.5.1.
Thank you for your help,
Regards,
Aurelien and Andrey
Tchiota GMBH