Hmm, OK.

Does your custom analyzer produce any tokens for the content you are indexing?


Mike McCandless

http://blog.mikemccandless.com


On Wed, Jul 17, 2013 at 9:03 AM, VIGNESH S <vigneshkln...@gmail.com> wrote:
> Hi Mike,
>
> I am Using a Custom Analyzer.
>
> Fields fields = MultiFields.getFields(reader);
>
> Terms trm = fields.terms(CONTENT_FIELD);  ---> Came null when i used
> TextField
>
> others when i use  fields.terms(),it came proper.
>
>
> On Wed, Jul 17, 2013 at 6:00 PM, Michael McCandless <
> luc...@mikemccandless.com> wrote:
>
>> On Wed, Jul 17, 2013 at 1:52 AM, VIGNESH S <vigneshkln...@gmail.com>
>> wrote:
>> > 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]
>> >
>> > FieldType offsetsType = new FieldType(TextField.TYPE_STORED);
>> >
>> >
>> offsetsType.setIndexOptions(IndexOptions.DOCS_AND_FREQS_AND_POSITIONS_AND_OFFSETS);
>> > Document doc = new Document();
>> >  Field body = new Field(ContentIndex.KEY_TEXTCONTENT, "", offsetsType);
>> >  body.setStringValue(content);
>> >
>> > When I use Fields fields = MultiFields.getFields(mReader),I found only
>> two
>> > fields coming subject and Title not the Content Field.
>>
>> Then something is definitely wrong: indexing as TextField should
>> tokenize the string and make it into the index.
>>
>> What analyzer are you using?
>>
>> And when you say "I found only two fields coming subject and Title not
>> the Content Field", how are you getting those fields from the Fields
>> instance?
>>
>> Can you make an isolated example showing the problem?
>>
>> Mike McCandless
>>
>> http://blog.mikemccandless.com
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
>> For additional commands, e-mail: java-user-h...@lucene.apache.org
>>
>>
>
>
> --
> Thanks and Regards
> Vignesh Srinivasan
> 9739135640

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org

Reply via email to