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 stockii <st...@shopgate.com> on 2010/06/01 17:24:27 UTC

how to use "q=string" in solrconfig.xml `?

hello.

this ist my request to solr. and i cannot change this.:
http://host/solr/select/?q=string

i cannot change this =( so i have a new termsComponent. i want to use
q=string as default for terms.prefix=string.

can i do somethin like this: ?

<lst name="defaults">
     <bool name="terms">true</bool>	
     <str name="terms.fl">suggest</str>
     <str name="terms.sort">index</str>
     <str name="terms.prefix">${???}</str>
</lst>

its all working, but i dont know how its possible to use terms.prefix =
q=string ?!?!?!!?
-- 
View this message in context: http://lucene.472066.n3.nabble.com/how-to-use-q-string-in-solrconfig-xml-tp861870p861870.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: how to use "q=string" in solrconfig.xml `?

Posted by stockii <st...@shopgate.com>.
okay thx. good idea with mod_rewrite =) thx
-- 
View this message in context: http://lucene.472066.n3.nabble.com/how-to-use-q-string-in-solrconfig-xml-tp861870p896902.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: how to use "q=string" in solrconfig.xml `?

Posted by Chris Hostetter <ho...@fucit.org>.
: this ist my request to solr. and i cannot change this.:
: http://host/solr/select/?q=string
: 
: i cannot change this =( so i have a new termsComponent. i want to use
: q=string as default for terms.prefix=string.
: 
: can i do somethin like this: ?
: 
: <lst name="defaults">
:      <bool name="terms">true</bool>	
:      <str name="terms.fl">suggest</str>
:      <str name="terms.sort">index</str>
:      <str name="terms.prefix">${???}</str>
: </lst>

in general: no.  for things that are QParsers there is a "local var" 
feature that can be used -- but the term.prefix isn't parsed as a query, 
so it doesn't work that way.

your best bet is to add a server side rule (using something like 
mod_rewrite) that adds a term.prefix param using the value of the q param



-Hoss