OK, Do not, repeat NOT use different tokenizers at index and query time unless you are _very_ sure that you know exactly what the consequences are.
Take a look at the admin/analyzer page for the field in question and put your values in. You'll see that what's in your index is very different than what's being looked for at query time. Nothing is worth trying until you straighten this out. The other great resource is adding debug=query to your URL and examining the parsed query. Best, Erick On Wed, Aug 27, 2014 at 12:08 PM, Romain Pigeyre <rpige...@gmail.com> wrote: > Hi, > > I have a little mistake using Solr : > > I can query this : "lastName:HK+IE" > The result contains the next record : > { "customerId": "0003500226598", "countryLibelle": "HONG KONG", > "firstName1": > "lC /o", "countryCode": "HK", "address1": " 1F0/", "address2": "11-35", " > storeId": "100", "lastName1": "HK IE", "city": "HONG KONG", "_version_": > 1477612965227135000 } > NB : lastName contains the lastName1 field. > > When I'm adding * on the same query : "lastName:*HK*+*IE*", there is no > result. I hoped that the * character replace 0 to n character. > > Here is my configuration : > <field name="lastName" type="text_general" indexed="true" stored="false" > multiValued="true"/> > > <copyField source="lastName1" dest="lastName"/> > <copyField source="lastName2" dest="lastName"/> > > <fieldType name="text_general" class="solr.TextField" > positionIncrementGap="100"> > <analyzer type="index"> > <tokenizer class="solr.WhitespaceTokenizerFactory"/> > <filter class="solr.StopFilterFactory" ignoreCase="true" > words="stopwords.txt" /> > <!-- in this example, we will only use synonyms at query time > <filter class="solr.SynonymFilterFactory" > synonyms="index_synonyms.txt" ignoreCase="true" expand="false"/> > --> > <filter class="solr.LowerCaseFilterFactory"/> > </analyzer> > <analyzer type="query"> > <tokenizer class="solr.StandardTokenizerFactory"/> > <filter class="solr.StopFilterFactory" ignoreCase="true" > words="stopwords.txt" /> > <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" > ignoreCase="true" expand="true"/> > <filter class="solr.LowerCaseFilterFactory"/> > </analyzer> > </fieldType> > > I'm using a WhitespaceTokenizerFactory at indexing time in order to keep > specials characters : /?... > After this configuration, I restarted Solr and re-indexed data. > > Is Somebody have any idea to resolve this issue? > > Thanks a lot > > -- > > *-----------------------------------------------------Romain PIGEYRE* >