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 Arkadi Colson <ar...@smartbit.be> on 2012/06/28 11:57:46 UTC

searching for more then one word

Hi

I indexed following strings:

"abcdefg hijklmnop"

When searching for abcdefg hijklmnop Solr returns the result but when 
searching for "abcdefg hijklmnop" Solr returns nothing.

Any idea how to search for more then one word?

[params] => SolrObject Object
                 (
                     [debugQuery] => true
                     [shards] => solr03-gs.intnet.smartbit.be:8983/solr,solr04-gs.intnet.smartbit.be:8983/solr,solr03-dcg.intnet.smartbit.be:8983/solr,solr04-dcg.intnet.smartbit.be:8983/solr
                     [fl] => id,smsc_module,smsc_modulekey,smsc_userid,smsc_ssid,smsc_description,smsc_content,smsc_courseid,smsc_lastdate,score
                     [indent] => on
                     [start] => 0
                     [q] => (smsc_content:"abcdefg hijklmnop" || smsc_description:"abcdefg hijklmnop") && (smsc_lastdate:[2008-05-28T08:45:50Z TO 2012-06-28T08:45:50Z])
                     [distrib] => true
                     [wt] => xml
                     [version] => 2.2
                     [rows] => 50
                 )


     <fieldType name="text" class="solr.TextField" 
positionIncrementGap="100">
       <analyzer type="index">
         <charFilter class="solr.HTMLStripCharFilterFactory"/>
         <tokenizer class="solr.KeywordTokenizerFactory"/>
         <filter class="solr.StopFilterFactory" ignoreCase="true" 
words="stopwords_en.txt,stopwords_du.txt" enablePositionIncrements="true"/>
         <filter class="solr.WordDelimiterFilterFactory" 
generateWordParts="1" generateNumberParts="1" catenateWords="1" 
catenateNumbers="1" catenateAll="0" splitOnCaseChange="1"/>
         <filter class="solr.LowerCaseFilterFactory"/>
         <filter class="solr.SnowballPorterFilterFactory" 
language="Dutch" />
       </analyzer>
       <analyzer type="query">
         <tokenizer class="solr.KeywordTokenizerFactory"/>
         <filter class="solr.SynonymFilterFactory" 
synonyms="synonyms.txt" ignoreCase="true" expand="true"/>-->
         <filter class="solr.StopFilterFactory" ignoreCase="true" 
words="stopwords_en.txt,stopwords_du.txt" enablePositionIncrements="true"/>
         <filter class="solr.WordDelimiterFilterFactory" 
generateWordParts="1" generateNumberParts="1" catenateWords="0" 
catenateNumbers="0" catenateAll="0" splitOnCaseChange="1"/>
         <filter class="solr.LowerCaseFilterFactory"/>
         <filter class="solr.SnowballPorterFilterFactory" 
language="Dutch" />
       </analyzer>
     </fieldType>


Thanks!

-- 
Smartbit bvba
Hoogstraat 13
B-3670 Meeuwen
T: +32 11 64 08 80
F: +32 89 46 81 10
W: http://www.smartbit.be
E: arkadi@smartbit.be


Re: searching for more then one word

Posted by Kissue Kissue <ki...@gmail.com>.
The analysis page is your best friend in these circumstances. Use the
analysis page in solr admin and turn verbose output for both index and
query and see what the analysis chain looks like. You maybe able to find
the culprit.


On Thu, Jun 28, 2012 at 10:57 AM, Arkadi Colson <ar...@smartbit.be> wrote:

> Hi
>
> I indexed following strings:
>
> "abcdefg hijklmnop"
>
> When searching for abcdefg hijklmnop Solr returns the result but when
> searching for "abcdefg hijklmnop" Solr returns nothing.
>
> Any idea how to search for more then one word?
>
> [params] => SolrObject Object
>                (
>                    [debugQuery] => true
>                    [shards] => solr03-gs.intnet.smartbit.be:**
> 8983/solr,solr04-gs.intnet.**smartbit.be:8983/solr,solr03-**
> dcg.intnet.smartbit.be:8983/**solr,solr04-dcg.intnet.**
> smartbit.be:8983/solr<http://solr03-gs.intnet.smartbit.be:8983/solr,solr04-gs.intnet.smartbit.be:8983/solr,solr03-dcg.intnet.smartbit.be:8983/solr,solr04-dcg.intnet.smartbit.be:8983/solr>
>                    [fl] => id,smsc_module,smsc_modulekey,**
> smsc_userid,smsc_ssid,smsc_**description,smsc_content,smsc_**
> courseid,smsc_lastdate,score
>                    [indent] => on
>                    [start] => 0
>                    [q] => (smsc_content:"abcdefg hijklmnop" ||
> smsc_description:"abcdefg hijklmnop") && (smsc_lastdate:[2008-05-28T08:**45:50Z
> TO 2012-06-28T08:45:50Z])
>                    [distrib] => true
>                    [wt] => xml
>                    [version] => 2.2
>                    [rows] => 50
>                )
>
>
>    <fieldType name="text" class="solr.TextField"
> positionIncrementGap="100">
>      <analyzer type="index">
>        <charFilter class="solr.**HTMLStripCharFilterFactory"/>
>        <tokenizer class="solr.**KeywordTokenizerFactory"/>
>        <filter class="solr.StopFilterFactory" ignoreCase="true"
> words="stopwords_en.txt,**stopwords_du.txt" enablePositionIncrements="**
> true"/>
>        <filter class="solr.**WordDelimiterFilterFactory"
> generateWordParts="1" generateNumberParts="1" catenateWords="1"
> catenateNumbers="1" catenateAll="0" splitOnCaseChange="1"/>
>        <filter class="solr.**LowerCaseFilterFactory"/>
>        <filter class="solr.**SnowballPorterFilterFactory"
> language="Dutch" />
>      </analyzer>
>      <analyzer type="query">
>        <tokenizer class="solr.**KeywordTokenizerFactory"/>
>        <filter class="solr.**SynonymFilterFactory"
> synonyms="synonyms.txt" ignoreCase="true" expand="true"/>-->
>        <filter class="solr.StopFilterFactory" ignoreCase="true"
> words="stopwords_en.txt,**stopwords_du.txt" enablePositionIncrements="**
> true"/>
>        <filter class="solr.**WordDelimiterFilterFactory"
> generateWordParts="1" generateNumberParts="1" catenateWords="0"
> catenateNumbers="0" catenateAll="0" splitOnCaseChange="1"/>
>        <filter class="solr.**LowerCaseFilterFactory"/>
>        <filter class="solr.**SnowballPorterFilterFactory"
> language="Dutch" />
>      </analyzer>
>    </fieldType>
>
>
> Thanks!
>
> --
> Smartbit bvba
> Hoogstraat 13
> B-3670 Meeuwen
> T: +32 11 64 08 80
> F: +32 89 46 81 10
> W: http://www.smartbit.be
> E: arkadi@smartbit.be
>
>