> In KinoSearch SVN trunk, satellite classes like QueryParser and Highlighter > have to be passed a Schema, which contains all the Analyzers. Analyzers > aren't satellite classes under this model -- they are a fixed property of a > FullTextType field spec. Think of them as baked into an SQL field definition. > > You can create a Schema from scratch to pass to the QueryParser, but it's > easier to just get it from the Searcher. Translating to Java... > > Searcher searcher = new Searcher("/path/to/index"); > QueryParser qparser = new QueryParser(searcher.getSchema()); > > I don't see how that's so different from getting an analyzer actsAsVersion > number from the index. > > Now, where stuff might start to get complicated is PerFieldAnalyzerWrapper... > is that where the sneakiness gets overwhelming? Some people can have setups more complex than that. Different analyzers per field. Custom analyzers. Several indexes using the same analyzer. Intentionally different analyzers for indexing and searching. Using this analyzer without any index at all - like I do highlight on a separate machine to minimize GC pauses, or tag docs by running a heap of queries against MemoryIndex.
-- Kirill Zakharenko/Кирилл Захаренко (ear...@gmail.com) Home / Mobile: +7 (495) 683-567-4 / +7 (903) 5-888-423 ICQ: 104465785 --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscr...@lucene.apache.org For additional commands, e-mail: java-dev-h...@lucene.apache.org