You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-dev@lucene.apache.org by smock <ha...@gmail.com> on 2009/08/22 23:36:38 UTC
multivalued integer testing
Hello,
I'm trying to write a test using a multivalued integer, for the
StatsComponents. I've defined a field with multivalued="true" and was able
to successfully add a document with multiple integer values. However, when
testing if the fieldtype is multivalued:
ft.isMultiValued()
the testing environment returns false, which screws up the component I'm
trying to test. The component works fine in a production environment - I'm
wondering what I'm doing wrong here?
Thanks,
-Harish
--
View this message in context: http://www.nabble.com/multivalued-integer-testing-tp25097576p25097576.html
Sent from the Solr - Dev mailing list archive at Nabble.com.
Re: multivalued integer testing
Posted by smock <ha...@gmail.com>.
Thanks, that worked!
Yonik Seeley-2 wrote:
>
> On Sat, Aug 22, 2009 at 5:36 PM, smock<ha...@gmail.com> wrote:
>> Hello,
>> I'm trying to write a test using a multivalued integer, for the
>> StatsComponents. I've defined a field with multivalued="true" and was
>> able
>> to successfully add a document with multiple integer values. However,
>> when
>> testing if the fieldtype is multivalued:
>> ft.isMultiValued()
>
> A FieldType is shared with all fields using that type, and many of the
> boolean flags such as "multiValued" act as defaults that specific
> fields can override.
>
> So try schemaField.isMultiValued()
>
> -Yonik
> http://www.lucidimagination.com
>
>
>
>> the testing environment returns false, which screws up the component I'm
>> trying to test. The component works fine in a production environment -
>> I'm
>> wondering what I'm doing wrong here?
>>
>> Thanks,
>> -Harish
>> --
>> View this message in context:
>> http://www.nabble.com/multivalued-integer-testing-tp25097576p25097576.html
>> Sent from the Solr - Dev mailing list archive at Nabble.com.
>>
>>
>
>
--
View this message in context: http://www.nabble.com/multivalued-integer-testing-tp25097576p25104396.html
Sent from the Solr - Dev mailing list archive at Nabble.com.
Re: multivalued integer testing
Posted by Yonik Seeley <yo...@lucidimagination.com>.
On Sat, Aug 22, 2009 at 5:36 PM, smock<ha...@gmail.com> wrote:
> Hello,
> I'm trying to write a test using a multivalued integer, for the
> StatsComponents. I've defined a field with multivalued="true" and was able
> to successfully add a document with multiple integer values. However, when
> testing if the fieldtype is multivalued:
> ft.isMultiValued()
A FieldType is shared with all fields using that type, and many of the
boolean flags such as "multiValued" act as defaults that specific
fields can override.
So try schemaField.isMultiValued()
-Yonik
http://www.lucidimagination.com
> the testing environment returns false, which screws up the component I'm
> trying to test. The component works fine in a production environment - I'm
> wondering what I'm doing wrong here?
>
> Thanks,
> -Harish
> --
> View this message in context: http://www.nabble.com/multivalued-integer-testing-tp25097576p25097576.html
> Sent from the Solr - Dev mailing list archive at Nabble.com.
>
>