lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bruno Mannina <bmann...@free.fr>
Subject Solr 5.0 - uniqueKey case insensitive ?
Date Mon, 04 May 2015 22:52:41 GMT
Dear Solr users,

I have a problem with SOLR5.0 (and not on SOLR3.6)

What kind of field can I use for my uniqueKey field named "code" if I 
want it case insensitive ?

On SOLR3.6, I defined a string_ci field like this:

<fieldType name="string_ci" class="solr.TextField" 
sortMissingLast="true" omitNorms="true">
     <analyzer>
       <tokenizer class="solr.KeywordTokenizerFactory"/>
       <filter class="solr.LowerCaseFilterFactory"/>
     </analyzer>
     </fieldType>

<field name="pn" type="string_ci" multiValued="false" indexed="true" 
required="true" stored="true"/>

and it works fine.
- If I add a document with the same code then the doc is updated.
- If I search a document with lower or upper case, the doc is found


But in SOLR5.0, if I use this definition then :
- I can search in lower/upper case, it's OK
- BUT if I add a doc with the same code then the doc is added not updated !?

I read that the problem could be that the type of field is tokenized 
instead of use a string.

If I change from string_ci to string, then
- I lost the possibility to search in lower/upper case
- but it works fine to update the doc.

So, could you help me to find the right field type to:

- search in case insensitive
- if I add a document with the same code, the old doc will be updated

Thanks a lot !


---
Ce courrier électronique ne contient aucun virus ou logiciel malveillant parce que la protection
avast! Antivirus est active.
http://www.avast.com


Mime
View raw message