You could insert a large position gap between sentences (say 100;
something larger than the largest sentence in #words), and a still
larger position gap between paragraphs (1000; larger than the largest para).
Then within-sentence search is just (A B)~100 and within-paragraph
search (A B)~1000
On 04/07/2014 03:47 AM, Jigar Shah wrote:
Hello all,
I need to implement 2 features in my application:
1. "Proximity for words and phrases within the same sentence"
2. "Proximity for words and phrases within the same paragraph"
Doing some research on internet if found following things.
There is "ProximityQueryNode" which has some enum for this, but there seems
no support in parser for it.
As there are no out-of-the box support or some contrib, for such feature,
except one
https://github.com/markrmiller/qsol. which is not maintained.
There are some workarounds suggested like marking sentence/paragraph
boundaries. And then search using SpanQuery Api.
Please let me know if some work done for such features, or some proven
approach.
Thanks
Jigar Shah.
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org