Re: MultiFields.getReader() returns null

2013-07-16 Thread VIGNESH S
Hi Mike, The Problem I mentioned is I used 3 Fields subject title, Content. I indexed Subject and Title like this.. doc.add(new StringField(subject, mAccountId, Field.Store.YES)); doc.add(new StringField(title, mSearchParam, Field.Store.YES)); I indexed Content like this[as a TextField] Field

Re: What is text searching algorithm in Lucene 4.3.1

2013-07-16 Thread Jack Krupansky
The source code is what most people use to understand how Lucene actually works. In some cases the Javadoc comments will point to published papers or web sites for algorithms or approaches. -- Jack Krupansky -Original Message- From: Vinh Đặng Sent: Tuesday, July 16, 2013 10:54 PM To:

What is text searching algorithm in Lucene 4.3.1

2013-07-16 Thread Vinh Đặng
Hi all, I am trying to apply Lucene for a specific domain, so I need to customize the text searching / text comparing algorithm of Lucene. Is there any guideline / tutorial or article which explains about how Lucene search and answer the query? Thank you very much. -- Thank you v

Re: ngrams in Lucene 4.3.0

2013-07-16 Thread Malgorzata Urbanska
Ok, I solved it I figured out; instead of NGramQuery in IndexSearcher I was using String :) gosia On Tue, Jul 16, 2013 at 12:28 PM, Malgorzata Urbanska wrote: > Hi, > > I built Indexer with NGramAnalizer which uses ShingleFilter > > Next I built Searcher with NGramQuery which uses BooleanQuery

RE: Lucene 4.0 tokenstream logic

2013-07-16 Thread zzT
Hi Uwe, Thanks for your immediate response and sorry for my late reply. I managed to solve my problem. Your comment was enough to "guide" me in the right direction. The problem was indeed inside my custom Analyzers/Tokenizers. The key point here is that createComponents() is called only once whil

Re: ngrams in Lucene 4.3.0

2013-07-16 Thread Malgorzata Urbanska
Hi, I built Indexer with NGramAnalizer which uses ShingleFilter Next I built Searcher with NGramQuery which uses BooleanQuery String termToken = charTermAttribute.toString(); Term t = new Term("content",termToken); add(new TermQuery(t),Occur.SHOULD); it looks like ever

Re: MultiFields.getReader() returns null

2013-07-16 Thread Michael McCandless
I'm confused about the problem: exactly which method call is returning null? What do yo umean by "it is coming in the contents of MultiReader"? Maybe post a full working test showing the problem? Your indexing code looks correct, except if you are using only PostingsHighlighter you don't need to

Re: MultiFields.getReader() returns null

2013-07-16 Thread VIGNESH S
Hi Mike, If i use StringField.Type_STORED instead of TextField.Type_Stored it is coming in the contents of MultiReader.. On Tue, Jul 16, 2013 at 7:16 PM, VIGNESH S wrote: > Hi Mike, > > Thanks for your Reply. > > Contents are Getting Indexed..In MultiReader the other two fields are > coming e

Re: MultiFields.getReader() returns null

2013-07-16 Thread VIGNESH S
Hi Mike, Thanks for your Reply. Contents are Getting Indexed..In MultiReader the other two fields are coming except the field(ContentIndex.KEY_TEXTCONTENT) which i indexed like below FieldType offsetsType = new FieldType(TextField.TYPE_STORED); offsetsType.setIndexed(true); offsetsType.setStored

Re: MultiFields.getReader() returns null

2013-07-16 Thread Michael McCandless
MultiFields.getFields returns null if the reader has no postings. Are you sure you actually indexed any content? Mike McCandless http://blog.mikemccandless.com On Tue, Jul 16, 2013 at 3:06 AM, VIGNESH S wrote: > Hi, > > I am creating index like this in\\using Lucene 4.3.1 > > I am using 3 fie

MultiFields.getReader() returns null

2013-07-16 Thread VIGNESH S
Hi, I am creating index like this in\\using Lucene 4.3.1 I am using 3 fields like FieldType offsetsType = new FieldType(TextField.TYPE_STORED); offsetsType.setIndexed(true); offsetsType.setStored(true); offsetsType.setStoreTermVectors(true); offsetsType.setTokenized(true); offsetsType.setStoreTe