You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Peter Kirk <pk...@alpha-solutions.dk> on 2012/11/14 09:34:25 UTC

Multivalued or not

Hi

In Solr 3.6, is multivalued for fields, default true or false?

It appears that it is default false for normal fields, and default true for dynamic fields - is that correct?

Thanks,
Peter



RE: Multivalued or not

Posted by Peter Kirk <pk...@alpha-solutions.dk>.
Should be 1.1 I see.

-----Original Message-----
From: Peter Kirk [mailto:pk@alpha-solutions.dk] 
Sent: 14. november 2012 10:24
To: solr-user@lucene.apache.org
Subject: RE: Multivalued or not

Hi, it says version 1.0

<schema name="naturereserve" version="1.0">

/Peter


-----Original Message-----
From: Erik Hatcher [mailto:erik.hatcher@gmail.com] 
Sent: 14. november 2012 10:22
To: solr-user@lucene.apache.org
Subject: Re: Multivalued or not

But what is your schema version?  See the top of schema.xml. 

On Nov 14, 2012, at 4:17, Peter Kirk <pk...@alpha-solutions.dk> wrote:

> Hi
> 
> Thanks for the reply. It is strange, because when I index to a field defined like:
> 
>    <dynamicField indexed="true"
>                  name="*_string"
>                  stored="true"
>                  type="string" />
> 
> Then the results I receive are like:
> 
> <arr name="category_string"> 
>  <str>Woodland</str> 
> </arr>
> 
> Which seems to indicate a multivalued field.
> 
> If I change the field definition, so I explicitly say multivalued is false:
> 
>    <dynamicField indexed="true"
>                  name="*_string"
>                  stored="true"
>                  type="string" 
>                  multivalued="false" />
> 
> Then the result is like:
> 
> <str name="category_string">Woodland</str>
> 
> 
> /Peter
> 
> 
> 
> -----Original Message-----
> From: Jeevanandam Madanagopal [mailto:jeeva@myjeeva.com] 
> Sent: 14. november 2012 10:11
> To: solr-user@lucene.apache.org
> Subject: Re: Multivalued or not
> 
> Hello Peter -
> 
> In Solr 3.6 multiValued is false by default.
> 
> Since Schema version 1.1 onwards multiValued attribute value is false by default (<field ...>, <dynamicField ...>, <fieldType ...>)
> 
> -Jeeva
> Blog: http://www.myjeeva.com 
> 
> 
> On Nov 14, 2012, at 2:04 PM, Peter Kirk <pk...@alpha-solutions.dk> wrote:
> 
>> Hi
>> 
>> In Solr 3.6, is multivalued for fields, default true or false?
>> 
>> It appears that it is default false for normal fields, and default true for dynamic fields - is that correct?
>> 
>> Thanks,
>> Peter
>> 
>> 
>> 
> 
> 





RE: Multivalued or not

Posted by Peter Kirk <pk...@alpha-solutions.dk>.
Hi - and thanks to you and Erik. I have changed to schema version 1.5.

/Peter

-----Original Message-----
From: Jeevanandam Madanagopal [mailto:jeeva@myjeeva.com] 
Sent: 14. november 2012 10:38
To: solr-user@lucene.apache.org
Subject: Re: Multivalued or not

Okay, I believe you're using Solr 3.6, here you can use schema version 1.5

However, you're currently using version 1.0, it safer to update your schema version to 1.1 then multiValued is false by default.

FYI. Schema version info (from schema.xml):
------------------------------------------------------
1.0: multiValued attribute did not exist, all fields are multiValued by nature
1.1: multiValued attribute introduced, false by default 
1.2: omitTermFreqAndPositions attribute introduced, true by default except for text fields
1.3: removed optional field compress feature
1.4: autoGeneratePhraseQueries attribute introduced to drive QueryParser behavior when a single string produces multiple tokens.  Defaults to off for version >= 1.4
1.5: omitNorms defaults to true for primitive field types (int, float, boolean, string...)

- Jeeva
Blog: http://www.myjeeva.com


On Nov 14, 2012, at 2:54 PM, Peter Kirk <pk...@alpha-solutions.dk> wrote:

> Hi, it says version 1.0
> 
> <schema name="naturereserve" version="1.0">
> 
> /Peter
> 
> 
> -----Original Message-----
> From: Erik Hatcher [mailto:erik.hatcher@gmail.com] 
> Sent: 14. november 2012 10:22
> To: solr-user@lucene.apache.org
> Subject: Re: Multivalued or not
> 
> But what is your schema version?  See the top of schema.xml. 
> 
> On Nov 14, 2012, at 4:17, Peter Kirk <pk...@alpha-solutions.dk> wrote:
> 
>> Hi
>> 
>> Thanks for the reply. It is strange, because when I index to a field defined like:
>> 
>>   <dynamicField indexed="true"
>>                 name="*_string"
>>                 stored="true"
>>                 type="string" />
>> 
>> Then the results I receive are like:
>> 
>> <arr name="category_string"> 
>> <str>Woodland</str> 
>> </arr>
>> 
>> Which seems to indicate a multivalued field.
>> 
>> If I change the field definition, so I explicitly say multivalued is false:
>> 
>>   <dynamicField indexed="true"
>>                 name="*_string"
>>                 stored="true"
>>                 type="string" 
>>                 multivalued="false" />
>> 
>> Then the result is like:
>> 
>> <str name="category_string">Woodland</str>
>> 
>> 
>> /Peter
>> 
>> 
>> 
>> -----Original Message-----
>> From: Jeevanandam Madanagopal [mailto:jeeva@myjeeva.com] 
>> Sent: 14. november 2012 10:11
>> To: solr-user@lucene.apache.org
>> Subject: Re: Multivalued or not
>> 
>> Hello Peter -
>> 
>> In Solr 3.6 multiValued is false by default.
>> 
>> Since Schema version 1.1 onwards multiValued attribute value is false by default (<field ...>, <dynamicField ...>, <fieldType ...>)
>> 
>> -Jeeva
>> Blog: http://www.myjeeva.com 
>> 
>> 
>> On Nov 14, 2012, at 2:04 PM, Peter Kirk <pk...@alpha-solutions.dk> wrote:
>> 
>>> Hi
>>> 
>>> In Solr 3.6, is multivalued for fields, default true or false?
>>> 
>>> It appears that it is default false for normal fields, and default true for dynamic fields - is that correct?
>>> 
>>> Thanks,
>>> Peter
>>> 
>>> 
>>> 
>> 
>> 
> 
> 
> 




Re: Multivalued or not

Posted by Jeevanandam Madanagopal <je...@myjeeva.com>.
Okay, I believe you're using Solr 3.6, here you can use schema version 1.5

However, you're currently using version 1.0, it safer to update your schema version to 1.1 then multiValued is false by default.

FYI. Schema version info (from schema.xml):
------------------------------------------------------
1.0: multiValued attribute did not exist, all fields are multiValued by nature
1.1: multiValued attribute introduced, false by default 
1.2: omitTermFreqAndPositions attribute introduced, true by default except for text fields
1.3: removed optional field compress feature
1.4: autoGeneratePhraseQueries attribute introduced to drive QueryParser behavior when a single string produces multiple tokens.  Defaults to off for version >= 1.4
1.5: omitNorms defaults to true for primitive field types (int, float, boolean, string...)

- Jeeva
Blog: http://www.myjeeva.com


On Nov 14, 2012, at 2:54 PM, Peter Kirk <pk...@alpha-solutions.dk> wrote:

> Hi, it says version 1.0
> 
> <schema name="naturereserve" version="1.0">
> 
> /Peter
> 
> 
> -----Original Message-----
> From: Erik Hatcher [mailto:erik.hatcher@gmail.com] 
> Sent: 14. november 2012 10:22
> To: solr-user@lucene.apache.org
> Subject: Re: Multivalued or not
> 
> But what is your schema version?  See the top of schema.xml. 
> 
> On Nov 14, 2012, at 4:17, Peter Kirk <pk...@alpha-solutions.dk> wrote:
> 
>> Hi
>> 
>> Thanks for the reply. It is strange, because when I index to a field defined like:
>> 
>>   <dynamicField indexed="true"
>>                 name="*_string"
>>                 stored="true"
>>                 type="string" />
>> 
>> Then the results I receive are like:
>> 
>> <arr name="category_string"> 
>> <str>Woodland</str> 
>> </arr>
>> 
>> Which seems to indicate a multivalued field.
>> 
>> If I change the field definition, so I explicitly say multivalued is false:
>> 
>>   <dynamicField indexed="true"
>>                 name="*_string"
>>                 stored="true"
>>                 type="string" 
>>                 multivalued="false" />
>> 
>> Then the result is like:
>> 
>> <str name="category_string">Woodland</str>
>> 
>> 
>> /Peter
>> 
>> 
>> 
>> -----Original Message-----
>> From: Jeevanandam Madanagopal [mailto:jeeva@myjeeva.com] 
>> Sent: 14. november 2012 10:11
>> To: solr-user@lucene.apache.org
>> Subject: Re: Multivalued or not
>> 
>> Hello Peter -
>> 
>> In Solr 3.6 multiValued is false by default.
>> 
>> Since Schema version 1.1 onwards multiValued attribute value is false by default (<field ...>, <dynamicField ...>, <fieldType ...>)
>> 
>> -Jeeva
>> Blog: http://www.myjeeva.com 
>> 
>> 
>> On Nov 14, 2012, at 2:04 PM, Peter Kirk <pk...@alpha-solutions.dk> wrote:
>> 
>>> Hi
>>> 
>>> In Solr 3.6, is multivalued for fields, default true or false?
>>> 
>>> It appears that it is default false for normal fields, and default true for dynamic fields - is that correct?
>>> 
>>> Thanks,
>>> Peter
>>> 
>>> 
>>> 
>> 
>> 
> 
> 
> 


RE: Multivalued or not

Posted by Peter Kirk <pk...@alpha-solutions.dk>.
Hi, it says version 1.0

<schema name="naturereserve" version="1.0">

/Peter


-----Original Message-----
From: Erik Hatcher [mailto:erik.hatcher@gmail.com] 
Sent: 14. november 2012 10:22
To: solr-user@lucene.apache.org
Subject: Re: Multivalued or not

But what is your schema version?  See the top of schema.xml. 

On Nov 14, 2012, at 4:17, Peter Kirk <pk...@alpha-solutions.dk> wrote:

> Hi
> 
> Thanks for the reply. It is strange, because when I index to a field defined like:
> 
>    <dynamicField indexed="true"
>                  name="*_string"
>                  stored="true"
>                  type="string" />
> 
> Then the results I receive are like:
> 
> <arr name="category_string"> 
>  <str>Woodland</str> 
> </arr>
> 
> Which seems to indicate a multivalued field.
> 
> If I change the field definition, so I explicitly say multivalued is false:
> 
>    <dynamicField indexed="true"
>                  name="*_string"
>                  stored="true"
>                  type="string" 
>                  multivalued="false" />
> 
> Then the result is like:
> 
> <str name="category_string">Woodland</str>
> 
> 
> /Peter
> 
> 
> 
> -----Original Message-----
> From: Jeevanandam Madanagopal [mailto:jeeva@myjeeva.com] 
> Sent: 14. november 2012 10:11
> To: solr-user@lucene.apache.org
> Subject: Re: Multivalued or not
> 
> Hello Peter -
> 
> In Solr 3.6 multiValued is false by default.
> 
> Since Schema version 1.1 onwards multiValued attribute value is false by default (<field ...>, <dynamicField ...>, <fieldType ...>)
> 
> -Jeeva
> Blog: http://www.myjeeva.com 
> 
> 
> On Nov 14, 2012, at 2:04 PM, Peter Kirk <pk...@alpha-solutions.dk> wrote:
> 
>> Hi
>> 
>> In Solr 3.6, is multivalued for fields, default true or false?
>> 
>> It appears that it is default false for normal fields, and default true for dynamic fields - is that correct?
>> 
>> Thanks,
>> Peter
>> 
>> 
>> 
> 
> 



Re: Multivalued or not

Posted by Erik Hatcher <er...@gmail.com>.
But what is your schema version?  See the top of schema.xml. 

On Nov 14, 2012, at 4:17, Peter Kirk <pk...@alpha-solutions.dk> wrote:

> Hi
> 
> Thanks for the reply. It is strange, because when I index to a field defined like:
> 
>    <dynamicField indexed="true"
>                  name="*_string"
>                  stored="true"
>                  type="string" />
> 
> Then the results I receive are like:
> 
> <arr name="category_string"> 
>  <str>Woodland</str> 
> </arr>
> 
> Which seems to indicate a multivalued field.
> 
> If I change the field definition, so I explicitly say multivalued is false:
> 
>    <dynamicField indexed="true"
>                  name="*_string"
>                  stored="true"
>                  type="string" 
>                  multivalued="false" />
> 
> Then the result is like:
> 
> <str name="category_string">Woodland</str>
> 
> 
> /Peter
> 
> 
> 
> -----Original Message-----
> From: Jeevanandam Madanagopal [mailto:jeeva@myjeeva.com] 
> Sent: 14. november 2012 10:11
> To: solr-user@lucene.apache.org
> Subject: Re: Multivalued or not
> 
> Hello Peter -
> 
> In Solr 3.6 multiValued is false by default.
> 
> Since Schema version 1.1 onwards multiValued attribute value is false by default (<field ...>, <dynamicField ...>, <fieldType ...>)
> 
> -Jeeva
> Blog: http://www.myjeeva.com 
> 
> 
> On Nov 14, 2012, at 2:04 PM, Peter Kirk <pk...@alpha-solutions.dk> wrote:
> 
>> Hi
>> 
>> In Solr 3.6, is multivalued for fields, default true or false?
>> 
>> It appears that it is default false for normal fields, and default true for dynamic fields - is that correct?
>> 
>> Thanks,
>> Peter
>> 
>> 
>> 
> 
> 

Re: Multivalued or not

Posted by Upayavira <uv...@odoko.co.uk>.
I'm pretty sure that Solr only checks whether a field is multivalued at
the point at which it receives the second value for a specific field. In
your <arr> entry below, you only provided one value, so Solr wouldn't
complain. Add another <str> line to your <arr>, and I bet you it will
moan at you.

Upayavira

On Wed, Nov 14, 2012, at 09:17 AM, Peter Kirk wrote:
> Hi
> 
> Thanks for the reply. It is strange, because when I index to a field
> defined like:
> 
>     <dynamicField indexed="true"
>                   name="*_string"
>                   stored="true"
>                   type="string" />
> 
> Then the results I receive are like:
> 
> <arr name="category_string"> 
>   <str>Woodland</str> 
> </arr>
> 
> Which seems to indicate a multivalued field.
> 
> If I change the field definition, so I explicitly say multivalued is
> false:
> 
>     <dynamicField indexed="true"
>                   name="*_string"
>                   stored="true"
>                   type="string" 
>                   multivalued="false" />
> 
> Then the result is like:
> 
> <str name="category_string">Woodland</str>
> 
> 
> /Peter
> 
> 
> 
> -----Original Message-----
> From: Jeevanandam Madanagopal [mailto:jeeva@myjeeva.com] 
> Sent: 14. november 2012 10:11
> To: solr-user@lucene.apache.org
> Subject: Re: Multivalued or not
> 
> Hello Peter -
> 
> In Solr 3.6 multiValued is false by default.
> 
> Since Schema version 1.1 onwards multiValued attribute value is false by
> default (<field ...>, <dynamicField ...>, <fieldType ...>)
> 
> -Jeeva
> Blog: http://www.myjeeva.com 
> 
> 
> On Nov 14, 2012, at 2:04 PM, Peter Kirk <pk...@alpha-solutions.dk> wrote:
> 
> > Hi
> > 
> > In Solr 3.6, is multivalued for fields, default true or false?
> > 
> > It appears that it is default false for normal fields, and default true for dynamic fields - is that correct?
> > 
> > Thanks,
> > Peter
> > 
> > 
> > 
> 
> 

RE: Multivalued or not

Posted by Peter Kirk <pk...@alpha-solutions.dk>.
Hi

Thanks for the reply. It is strange, because when I index to a field defined like:

    <dynamicField indexed="true"
                  name="*_string"
                  stored="true"
                  type="string" />

Then the results I receive are like:

<arr name="category_string"> 
  <str>Woodland</str> 
</arr>

Which seems to indicate a multivalued field.

If I change the field definition, so I explicitly say multivalued is false:

    <dynamicField indexed="true"
                  name="*_string"
                  stored="true"
                  type="string" 
                  multivalued="false" />

Then the result is like:

<str name="category_string">Woodland</str>


/Peter



-----Original Message-----
From: Jeevanandam Madanagopal [mailto:jeeva@myjeeva.com] 
Sent: 14. november 2012 10:11
To: solr-user@lucene.apache.org
Subject: Re: Multivalued or not

Hello Peter -

In Solr 3.6 multiValued is false by default.

Since Schema version 1.1 onwards multiValued attribute value is false by default (<field ...>, <dynamicField ...>, <fieldType ...>)

-Jeeva
Blog: http://www.myjeeva.com 


On Nov 14, 2012, at 2:04 PM, Peter Kirk <pk...@alpha-solutions.dk> wrote:

> Hi
> 
> In Solr 3.6, is multivalued for fields, default true or false?
> 
> It appears that it is default false for normal fields, and default true for dynamic fields - is that correct?
> 
> Thanks,
> Peter
> 
> 
> 



Re: Multivalued or not

Posted by Jeevanandam Madanagopal <je...@myjeeva.com>.
Hello Peter -

In Solr 3.6 multiValued is false by default.

Since Schema version 1.1 onwards multiValued attribute value is false by default (<field …>, <dynamicField …>, <fieldType ...>)

-Jeeva
Blog: http://www.myjeeva.com 


On Nov 14, 2012, at 2:04 PM, Peter Kirk <pk...@alpha-solutions.dk> wrote:

> Hi
> 
> In Solr 3.6, is multivalued for fields, default true or false?
> 
> It appears that it is default false for normal fields, and default true for dynamic fields - is that correct?
> 
> Thanks,
> Peter
> 
> 
>