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 jmlucjav <jm...@gmail.com> on 2012/04/04 00:00:52 UTC

space making it hard tu use wilcard with lucene parser

Hi,

I have a field type simpletext:
    <fieldType name="simpletext" class="solr.TextField"
positionIncrementGap="100">
      <analyzer>
		<tokenizer class="solr.KeywordTokenizerFactory"/>
                <filter class="solr.LowerCaseFilterFactory"/>
		<filter class="solr.TrimFilterFactory" />
      </analyzer>
    </fieldType>	
I have such a field name="fsuggest" type="simpletext" 

I index there a value like this (bewtween []): [wi/rac/house aa bbb] 
I can see in analysys page it is indexed as [wi/rac/house aa bbb] 

I have a handler: 
  <requestHandler name="/suggest" class="solr.SearchHandler">
     <lst name="defaults">
	   <str name="defType">lucene</str>
        <str name="echoParams">explicit</str>
     </lst>
  </requestHandler>  
  
I query: 
http://localhost:8983/solr/select/?qt=/suggest&q=fsuggest:wi/rac/ho*  -- I
get the doc
http://localhost:8983/solr/select/?qt=/suggest&q=fsuggest:wi/rac/house a* --
I don't get that doc, and I get other docs that have fsuggest:abc

Is there a way to query for: fsuggest starting with 'wi/rac/house a' ??
I am in Solr3.5

I could not find a way
thanks
xab


--
View this message in context: http://lucene.472066.n3.nabble.com/space-making-it-hard-tu-use-wilcard-with-lucene-parser-tp3882534p3882534.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: space making it hard tu use wilcard with lucene parser

Posted by jmlucjav <jm...@gmail.com>.
thanks, that will work I think

--
View this message in context: http://lucene.472066.n3.nabble.com/space-making-it-hard-tu-use-wilcard-with-lucene-parser-tp3882534p3885460.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: space making it hard tu use wilcard with lucene parser

Posted by Ahmet Arslan <io...@yahoo.com>.
> I query: 
> http://localhost:8983/solr/select/?qt=/suggest&q=fsuggest:wi/rac/ho* 
> -- I
> get the doc
> http://localhost:8983/solr/select/?qt=/suggest&q=fsuggest:wi/rac/house
> a* --
> I don't get that doc, and I get other docs that have
> fsuggest:abc
> 
> Is there a way to query for: fsuggest starting with
> 'wi/rac/house a' ??

You can use prefix query parser. &q={!prefix f=fsuggest}wi/rac/house a

http://lucene.apache.org/solr/api/org/apache/solr/search/PrefixQParserPlugin.html