Re: AnalyzingInfixSuggester

2018-02-24 Thread Greg Huber
I build org.apache.lucene.analysis.Analyzer using these options and the suggester works 100% for me. return CustomAnalyzer.builder() .withTokenizer(StandardTokenizerFactory.class) .addTokenFilter(StandardFilterFactory.class) .addTokenFilt

Re: AnalyzingInfixSuggester Lucene 5.3.0

2015-08-28 Thread Arcadius Ahouansou
Hello Greg. Not a direct answer to your question... If all you are changing is the default OR into AND, there may be other alternative like: - a jira ticket to allow to choose the operator, - have you looked at the more flexible option where you can pass to lookup() your own custom built Boolean

Re: AnalyzingInfixSuggester questions

2014-08-15 Thread Michael Sokolov
I opened LUCENE-5889. While I was writing that I remembered another gap: it would be useful to have a delete() method. Callers might like to be able to include or exclude terms based on their frequency, which can change over time, and at the very least when a term no longer occurs in the sourc

Re: AnalyzingInfixSuggester questions

2014-08-15 Thread Michael Sokolov
On 8/14/2014 5:48 PM, Michael McCandless wrote: I think we should expose commit? Can you open an issue? I will And fix the NPEs to be a more informative exc? E.g. IllegalStateException w/ a reasonable message ... You should be able to init AIS on a previously built suggester, not .build() it

Re: AnalyzingInfixSuggester questions

2014-08-14 Thread Michael McCandless
I think we should expose commit? Can you open an issue? And fix the NPEs to be a more informative exc? E.g. IllegalStateException w/ a reasonable message ... You should be able to init AIS on a previously built suggester, not .build() it every time your application starts... Mike McCandless h

Re: AnalyzingInfixSuggester

2013-07-28 Thread Michael McCandless
You're calling .build once per suggestion, which is not right. Instead you should call it once, overall, and pass it an iterator that iterates over all the suggestions you pull from the index. E.g. fill in TermFreqPayload[] up front by walking through your entire index, then create TermFreqPayloa

Re: AnalyzingInfixSuggester

2013-07-28 Thread vonPuh fonPuhendorf
Yes with the lookup api. It return the token with appended that`s why it has to interact with api. But how to how to iterate over my real index In scala: def infixSuggest(){ val sourceindex = new File("/tmp/lucene/1374960475771") val reader = DirectoryReader.open(FSDirectory.open(sourc

Re: AnalyzingInfixSuggester

2013-07-27 Thread Michael McCandless
Right, you need those classes from src/test to compile the test case. Just run "ant test -Dtestcase=AnalyzingInfixSuggesterTest" from the lucene/suggest directory. Also, you cannot pass a "real index" to the suggester: it builds the index itself, when you call the .build method. This index is pr

Re: AnalyzingInfixSuggester

2013-07-26 Thread vonPuh fonPuhendorf
that is because they are not in the suggest but in src test folder 2013/7/26 vonPuh fonPuhendorf > using lucene 4.4 > > > 2013/7/26 vonPuh fonPuhendorf > >> Hello i am trying to build the example but TermFreqPayload >> and TermFreqPayloadArrayIterator are missing from suggest package also how

Re: AnalyzingInfixSuggester

2013-07-26 Thread vonPuh fonPuhendorf
using lucene 4.4 2013/7/26 vonPuh fonPuhendorf > Hello i am trying to build the example but TermFreqPayload > and TermFreqPayloadArrayIterator are missing from suggest package also how > to pass to suggester.build method real index instead of mock words so it > can rebuild it. > >