lucenenet-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shad Storhaug <s...@shadstorhaug.com>
Subject RE: AnalyzingInfixSuggester commit
Date Wed, 10 Jan 2018 13:41:29 GMT
David,

>From your description, it sounds like the Commit method is similar to the Store method:
https://lucene.apache.org/core/4_8_0/suggest/org/apache/lucene/search/suggest/analyzing/AnalyzingInfixSuggester.html

Do note there are examples of usage in the AnalyzingInfixSuggesterTest: https://github.com/apache/lucenenet/blob/a3a12967b250e8e7e5f623f0ba7572ec64f479ac/src/Lucene.Net.Tests.Suggest/Suggest/Analyzing/AnalyzingInfixSuggesterTest.cs

Thanks,
Shad Storhaug (NightOwl888)

-----Original Message-----
From: David Ball [mailto:david.ball@webxsystems.com] 
Sent: Tuesday, January 9, 2018 5:45 PM
To: user@lucenenet.apache.org
Subject: AnalyzingInfixSuggester commit
Importance: High

Hi.

Once a lookup has been built using a AnalyzingInfixSuggester, how can it be commited to disk
such that it doesn't have to be built again? Old documentation shows a 'Commit' method that
has since been removed.

The lookup is built and works fine first time around, but I can't figure out how to reload
it.

using (var dir = FSDirectory.Open(_indexDirectory))
           {
                using (var analyzer = new StandardAnalyzer(LuceneVersion.LUCENE_48))
                {
                    var suggester = new AnalyzingInfixSuggester(LuceneVersion.LUCENE_48, dir,
analyzer);

                    // Build
                    //suggester.Build(new DocumentIterator(documents.GetEnumerator()));
                }
            }

Kind regards,
David


Mime
View raw message