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 adityab <ad...@yahoo.com> on 2013/02/20 07:22:11 UTC
Dynamic field searching with edismax
We have a search query which we want to configure in Solrconfig.xml and lock
down in such a way that user will just pass the keyword e.g
q=facebook&qf=title.0&defType=edismax
We have a dynamic field title.* for each language. During search the "*" is
replaced with login user language and hence need to perform search on
q=keyword&df=title.<userlangId>
is there way in solr query to substitute variable in fieldName dynamically.
so we can configure solrconfig.xml with
<str name="qf">title.${ul}</str>
and client can pass the value of ul in http request like
http://../solr/select/q=keyword&ul=1&defType=edismax
we want to restrict user to search on only one dynamic field.
thanks
--
View this message in context: http://lucene.472066.n3.nabble.com/Dynamic-field-searching-with-edismax-tp4041461.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: Dynamic field searching with edismax
Posted by adityab <ad...@yahoo.com>.
thanks Erick,
looks like i need to generate some part of the query in Application layer to
handle this.
--
View this message in context: http://lucene.472066.n3.nabble.com/Dynamic-field-searching-with-edismax-tp4041461p4041551.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: Dynamic field searching with edismax
Posted by Erick Erickson <er...@gmail.com>.
Not sure it would work in your case, but see "parameter dereferencing"
here: http://wiki.apache.org/solr/LocalParams. I rather doubt this works
with field names, but it's the closest thing I see.
But it seems like you'd do this in the application layer when you construct
the link for display...
Best
Erick
On Wed, Feb 20, 2013 at 1:22 AM, adityab <ad...@yahoo.com> wrote:
> We have a search query which we want to configure in Solrconfig.xml and
> lock
> down in such a way that user will just pass the keyword e.g
> q=facebook&qf=title.0&defType=edismax
>
> We have a dynamic field title.* for each language. During search the "*" is
> replaced with login user language and hence need to perform search on
> q=keyword&df=title.<userlangId>
>
> is there way in solr query to substitute variable in fieldName dynamically.
> so we can configure solrconfig.xml with
> <str name="qf">title.${ul}</str>
>
> and client can pass the value of ul in http request like
> http://../solr/select/q=keyword&ul=1&defType=edismax
>
> we want to restrict user to search on only one dynamic field.
>
> thanks
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Dynamic-field-searching-with-edismax-tp4041461.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>