lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shawn Heisey <apa...@elyograg.org>
Subject Re: index fields with custom gaps between terms
Date Tue, 19 Dec 2017 13:31:35 GMT
On 12/19/2017 4:16 AM, Amin Raeiszadeh wrote:
> i solve this problem by developing of DocumentBuilder.toDocument()
> and DocumentBuilder.addField() functions.i don't use multiValue feature
> and in shcema i change the condition of check for multi value
> fields(skip it in colde)
> then in necessary position i put my custom gap as a value for textField.
> 
> now i have a question in schema. why we set a field as multi value?
> in other word what kind of situation caused use of this feature because
> i think it was possible to let to the developer to add multiple value for a
> field then it will be multi value or not then it will be single value.

If you have multiValued set to false and try to add more than one value 
to a field when you index, the indexing will fail with an error message 
in the log.

Multiple values is different than multiple terms in a solr.TextField type.

When a field is multiValued and is populated, the search results will 
have an array for that field instead of a single value, because multiple 
values may be present.

Thanks,
Shawn

Mime
View raw message