Hi all,
I would like to suggest you some changes on the LuceneQueryBuilder class if you mind.
Just to avoid some duplication and to simplify a litle bit the code concerning the geographical search.
This makes me wonder few questions and I would like to share with you for hints if any…
First one is about BooleanClause.Occur clause for the fullyOutsideOf relation query.
It seems that there is only one different value in the case of eastBL parameter with (required = false, prohibited=false) arguments for LuceneUtils.convertRequiredAndProhibitedToOccur instead of (true,false) for all other parameters and other relations.
Looking at the old lucene-utils.xsl file, it appears that this relation was encapsulated into a boolean clause, around the global boolean query, which is not the case in the java implementation… That seems to be a bug for me.
The second question is about bbox values (ie eastBL, westBL, …). Why are we proceeding with a toLowerCase method on each one?
Is there any reason for that??
You will find enclosed a patch, please send me feedback if any.
I also move to the TermRangeQuery since we upgrade Lucene version to 2.9 and the old RangeQuery was deprecated.
But in fact we could use the NumericRangeQuery for that case, what do you think?
BTW, I’m just wondering if it worth to spend time on that or if we should move to spatial search based on spatial index as Simon did for the Bluenet sandbox?
Thanks for your feedbacks,
Ciao,
Mathieu
(attachments)
LuceneQueryBuilder.patch (25 KB)