RE: Upgrade 6.2.x Char* API's

2016-09-21 Thread Markus Jelsma
Hello Uwe, In both cases we sub-class TokenFilterFactories or, indeed, StopAnalyzerBase just because it is so convenient to use original Lucene classes as template for Factories or Analyzers. Why should we not be 'allowed' to load protwords, or stopwords just as convenient a Lucene does? In wh

Re: Strange index corruption related to numeric fields when upgrading from 6.0.1

2016-09-21 Thread Erick Erickson
Actually, it's more of a warning for both projects I think. The danger here is that lots of things will work just fine with different characters in the field names than that recommendation. But there's no explicit testing (that I know of) for all the places that could be affected. Admittedly by th

RE: How to build a Lucene BooleanQuery?

2016-09-21 Thread szzoli
And this works with Lucene 6.2 -- View this message in context: http://lucene.472066.n3.nabble.com/How-to-build-a-Lucene-BooleanQuery-tp4297102p4297153.html Sent from the Lucene - Java Users mailing list archive at Nabble.com. --

RE: How to build a Lucene BooleanQuery?

2016-09-21 Thread szzoli
Thank you. I solved the problem so: BooleanQuery.Builder builder = new BooleanQuery.Builder(); TermQuery subQuery1 = new TermQuery(new Term(field, queryString1)); TermQuery subQuery2 = new TermQuery(new Term(field, queryString2)); builder.add(subQuery1, Boolean

RE: How to build a Lucene BooleanQuery?

2016-09-21 Thread Uwe Schindler
Hi, Lucene 6 does not have this possibility anymore, the constructor was deprecated in 5.x. You have to use the builder, see the other e-mail by Oliver Kaleske. Uwe - Uwe Schindler H.-H.-Meier-Allee 63, D-28213 Bremen http://www.thetaphi.de eMail: u...@thetaphi.de > -Original Message--

RE: Upgrade 6.2.x Char* API's

2016-09-21 Thread Uwe Schindler
Hi, CharacterUtils is a class marked as "internal" and changed its name, there is no requirement to add backwards compatibility. You should not use it in code outside of Lucene, it is just public to allow cross-package usage. With Java 9 mdoule system it might get hidden in the future, but not

Re: How to build a Lucene BooleanQuery?

2016-09-21 Thread Chaitanya Kumar Ch
I am able to create BooleanQuery using BooleanQuery categoryQuery = new BooleanQuery(); I don't understand why you said it does not exist. On Wed, Sep 21, 2016 at 4:39 PM, szzoli wrote: > Thank you. > > This is almost the solution, but how can I build a BoolesanQuery? > The > BooleanQuery categ

AW: How to build a Lucene BooleanQuery?

2016-09-21 Thread Oliver Kaleske
Try BooleanQuery.Builder builder = new BooleanQuery.Builder(); builder.add(subQuery1, occur1); builder.add(subQuery2, occur2); // ... BooleanQuery query = builder.build(); -Ursprüngliche Nachricht- Von: szzoli [mailto:reg9sz...@freemail.hu] Gesen

Re: How to build a Lucene BooleanQuery?

2016-09-21 Thread szzoli
Thank you. This is almost the solution, but how can I build a BoolesanQuery? The BooleanQuery categoryQuery = new BooleanQuery(); does not exist, the builder.createBooleanQuery(field, queryString); creats a TermQuery. -- View this message in context: http://lucene.472066.n3.nabble.com/How-to

Re: How to build a Lucene BooleanQuery?

2016-09-21 Thread Chaitanya Kumar Ch
May be it helps you. On Wed, Sep 21, 2016 at 4:11 PM, szzoli wrote: > Hi, > > I would like to build a BooleanQuery. This migt be simple, but I cannot > find > the way how to do it. > It is also silly that the funct

How to build a Lucene BooleanQuery?

2016-09-21 Thread szzoli
Hi, I would like to build a BooleanQuery. This migt be simple, but I cannot find the way how to do it. It is also silly that the function builder.createBooleanQuery(field, queryString, BooleanClause.Occur.MUST); builds a TermQuery. How can I bild such a query like "fox MUST dog MUST_NOT" ? TIA

Upgrade 6.2.x Char* API's

2016-09-21 Thread Markus Jelsma
Hello - upgrading one of our libraries to 6.2.0 failed due to LUCENE-7318. This is fixed nicely on 6.2.1, many thanks for that! Upgrading to 6.2.1, however, still raises compile errors. I haven't seen any notice of this in CHANGES.txt or its API changes section for both 6.2.x versions. Any tips

RE: Strange index corruption related to numeric fields when upgrading from 6.0.1

2016-09-21 Thread Jan-Willem van den Broek
Hi Erick, Isn't that a SOLR restriction? I can't find anything about it in the Lucene docs. If it applies to Lucene as well, then we have some work to do, since the brackets are indeed part of the field name. (Also a space in front.) We use things like that a lot to avoid collisions in generat