Stev_k
Stev_k

Reputation: 2126

field queries using solr and velocity

I am trying to modify the default Soloritas templates to provide a UI for Solr. I want a very simple query bar, which should query on the full text of the file, stored in attr_content.

Currently my query.vm file in relation to this component is the default as follows:

<span #annTitle("Add the query using the &q= parameter")>Find: 
<input type="text" id="q" name="q" value="$!esc.html($params.get('q'))"/> 
<input type="submit" id="querySubmit"/> <input type="reset"/></span>

How can I add on the required "attr_content:" string to the query parameters, because I don't want the user to have to type it for obvious reasons.

Upvotes: 0

Views: 510

Answers (1)

Mauricio Scheffer
Mauricio Scheffer

Reputation: 99750

You could use dismax instead and configure your field attr_content in the qf parameter. All of this configured server-side, no need to change anything in your Velocity views.

Upvotes: 2

Related Questions