lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vonPuh fonPuhendorf <>
Subject Re: AnalyzingInfixSuggester
Date Sun, 28 Jul 2013 17:59:35 GMT
Yes with the lookup api. It return the token with <b> </b> appended that`s
why it has to interact with api.  But how to how to iterate over my real
In scala:

def infixSuggest(){

    val sourceindex = new File("/tmp/lucene/1374960475771")
    val reader =
    val searcher = new IndexSearcher(reader)
    val suggester = new AnalyzingInfixSuggester(Version.LUCENE_44,new

    val indReader = searcher.getIndexReader
    val maxid = indReader.maxDoc()

    for(id<-0 until maxid){

      val doc =  searcher.doc(id)
      val keys =  Array[TermFreqPayload](new
TermFreqPayload(doc.get("contents"), 3, new BytesRef(doc.get("id"))))
       val iterator =  new TermFreqPayloadArrayIterator(keys)



Figure out that AnalyzingInfixSuggester has to be in its own index and use
source index(the one i like to get words from it). It works fine but for
every increment its start from clean index i.e it tokenized and indexed
only the last document.  Mike said that it has no incremental support, so
how to pass my source index.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message