You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by Victor Hadianto <vi...@nuix.com.au> on 2003/08/15 00:52:43 UTC

Using Reader to index Stored value.

Hi All,

Why can't we use Reader to index stored value in Lucene. I found it strange. 
And also in the code I saw that the String value is converted to a 
StringReader anyway.

Any reason why?


Regards,

-- 
Victor Hadianto


Re: Using Reader to index Stored value.

Posted by Victor Hadianto <vi...@nuix.com.au>.
> made for the UnIndexed() and UnStored() methods which only accept Strings.

UnStored can be done using Field.Text(name, reader) method, which, despite the 
name, will produce the same result with Field.UnStored(). What escapes me is 
why Field.Text() --> UnStored. Why can we make unstored field using 
Field.UnStored(name, reader) and stored field using Field.Text(name, reader).

victor


>
> Brian
>
> > Hi All,
> >
> > Why can't we use Reader to index stored value in Lucene. I found it
>
> strange.
>
> > And also in the code I saw that the String value is converted to a
> > StringReader anyway.
> >
> > Any reason why?
> >
> >
> > Regards,
> >
> > --
> > Victor Hadianto
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: lucene-dev-help@jakarta.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-dev-help@jakarta.apache.org

-- 
Victor Hadianto

NUIX Pty Ltd
Level 8, 143 York Street, Sydney 2000
Phone: (02) 9283 9010
Fax:   (02) 9283 9020

This message is intended only for the named recipient. If you are not the
intended recipient you are notified that disclosing, copying, distributing
or taking any action in reliance on the contents of this message or
attachment is strictly prohibited.

Re: Using Reader to index Stored value.

Posted by Victor Hadianto <vi...@nuix.com.au>.
> made for the UnIndexed() and UnStored() methods which only accept Strings.

UnStored can be done using Field.Text(name, reader) method, which, despite the 
name, will produce the same result with Field.UnStored(). What escapes me is 
why Field.Text() --> UnStored. Why can we make unstored field using 
Field.UnStored(name, reader) and stored field using Field.Text(name, reader).

victor


>
> Brian
>
> > Hi All,
> >
> > Why can't we use Reader to index stored value in Lucene. I found it
>
> strange.
>
> > And also in the code I saw that the String value is converted to a
> > StringReader anyway.
> >
> > Any reason why?
> >
> >
> > Regards,
> >
> > --
> > Victor Hadianto
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: lucene-dev-help@jakarta.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-dev-help@jakarta.apache.org

-- 
Victor Hadianto

NUIX Pty Ltd
Level 8, 143 York Street, Sydney 2000
Phone: (02) 9283 9010
Fax:   (02) 9283 9020

This message is intended only for the named recipient. If you are not the
intended recipient you are notified that disclosing, copying, distributing
or taking any action in reliance on the contents of this message or
attachment is strictly prohibited.

---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-dev-help@jakarta.apache.org


Re: Using Reader to index Stored value.

Posted by Brian Mila <bm...@iastate.edu>.
I am curious about this as well.  I often have to read an entire stream into
a string just to be able to store the value in the index.  It would be nice
if there was a way to specify that a field is to be stored regardless if it
is a Reader value or a String value.   And the same argument could be made
for the UnIndexed() and UnStored() methods which only accept Strings.

Brian


> Hi All,
>
> Why can't we use Reader to index stored value in Lucene. I found it
strange.
> And also in the code I saw that the String value is converted to a
> StringReader anyway.
>
> Any reason why?
>
>
> Regards,
>
> --
> Victor Hadianto
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-dev-help@jakarta.apache.org
>
>





Re: Using Reader to index Stored value.

Posted by Brian Mila <bm...@iastate.edu>.
I am curious about this as well.  I often have to read an entire stream into
a string just to be able to store the value in the index.  It would be nice
if there was a way to specify that a field is to be stored regardless if it
is a Reader value or a String value.   And the same argument could be made
for the UnIndexed() and UnStored() methods which only accept Strings.

Brian


> Hi All,
>
> Why can't we use Reader to index stored value in Lucene. I found it
strange.
> And also in the code I saw that the String value is converted to a
> StringReader anyway.
>
> Any reason why?
>
>
> Regards,
>
> --
> Victor Hadianto
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-dev-help@jakarta.apache.org
>
>





---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-dev-help@jakarta.apache.org