lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jack Krupansky" <j...@basetechnology.com>
Subject Re: CommaSplit and query is free text search
Date Thu, 21 Mar 2013 19:31:35 GMT
That's fine as far as it goes, but the input is multi-valued, so merely 
splitting tokens on comma doesn't make the tokens separate values.

Given:

{"worked_company_name":["Dell","Microsoft,Facebook"] }

The regex would produced the equivalent of :

{"worked_company_name":["Dell","Microsoft Facebook"] }

Or is the desired goal:

{"worked_company_name":["Dell","Microsoft","Facebook"] }

Or, something else?

-- Jack Krupansky

-----Original Message----- 
From: Keswani, Nitin - BLS CTR
Sent: Thursday, March 21, 2013 2:54 PM
To: solr-user@lucene.apache.org ; anurag.kota@gmail.com
Subject: RE: CommaSplit and query is free text search

You can use a type defined below to split on comma. Please note I have not 
used any additional filters.
Based on your requirements you might want to add more filters for further 
processing after tokenisation :

<!-- A text field that only splits on comma for exact matching of words -->
    <fieldType name="text_split_on_comma" class="solr.TextField" 
positionIncrementGap="100">
      <analyzer>
        <tokenizer class="solr.PatternTokenizerFactory" pattern="," />
      </analyzer>
    </fieldType>

Thanks.

Regards,

Nitin Keswani


-----Original Message-----
From: anurag.jain [mailto:anurag.kota@gmail.com]
Sent: Thursday, March 21, 2013 10:10 AM
To: solr-user@lucene.apache.org
Subject: CommaSplit and query is free text search

I have field named as  worked_company_name.

in json input i am giving value like

{
"worked_company_name":["Dell","Microsoft,Facebook"]
}

-> data is very bad. means it may have comma etc.


<field name="worked_company_name" type="comaSplitwithsearch" indexed="true"
stored="true"/>


so can you please tell me how type should ?


comaSplitwithsearch ??


thanks






--
View this message in context: 
http://lucene.472066.n3.nabble.com/CommaSplit-and-query-is-free-text-search-tp4049734.html
Sent from the Solr - User mailing list archive at Nabble.com. 


Mime
View raw message