Re: Index-boosting not working in 5.2.1?

2015-07-01 Thread Adrien Grand
Hi Markus, Tetra* will be parsed as a PrefixQuery, which returns a constant score by default. You can enable scoring by calling MultiTermQuery.setRewriteMethod(SCORING_BOOLEAN_REWRITE) on it[1]. However, this will have the downside that not all possible terms matching this prefix will be considere

Re: Index-boosting not working in 5.2.1?

2015-07-01 Thread Markus Hegi - Nagavkar
Thanks Adrien for the quick response - that's a good hint - I simplified my code and realized, that the sorting DOES work, if I use full words. With "*", index boosting is not taken into account - see below my code, I used the two queries for testing: "Tetrachloroethane" - scoring works fine "Tet

Re: Index-boosting not working in 5.2.1?

2015-07-01 Thread Adrien Grand
What query did you run? Not all queries take index-time boosts into account for scoring. On Wed, Jul 1, 2015 at 7:30 PM, Markus Hegi - Nagavkar wrote: > Hello > > Downloaded & imported latest 5.2.1 version, but Index-scoring seems not to > work for me: > > I index two types of documents: > - For

Index-boosting not working in 5.2.1?

2015-07-01 Thread Markus Hegi - Nagavkar
Hello Downloaded & imported latest 5.2.1 version, but Index-scoring seems not to work for me: I index two types of documents: - For one, I boost every field with a factor 1 - For the other one, I boost every field with 0.01 When I search, I get documents of both types, but for ALL document an id

Re: Delete Parents without any children...

2015-07-01 Thread Adrien Grand
Hi Ravikumar, You need to run a BooleanQuery with two clauses: - a must clause that matches all parent documents - a must_not clause that matches all parents that have children Building this second clause can be done easily with a ToParentBlockJoinQuery around a child query that matches all you

Delete Parents without any children...

2015-07-01 Thread Ravikumar Govindarajan
We have organised our segments in parent-child blocks and wish to periodically delete parent-documents that don't have any children to reclaim space via IndexWriter.deleteDocuments(Query)… Is it possible to draft a Query that identifies such parents? Any help is much appreciated… -- Ravi