(I am using solr 3.4 and edismax.)

In my index, I have a multivalued field named "genre". One of the
values this field can have is "Citation". I would like documents that
have a genre field of Citation to always be at the bottom of the
search results.

I've been experimenting, but I can't seem to figure out the syntax of
the search I need. Here is the search that seems most logical to me
(newlines added here for readability):

q=%2bcontent%3Anotes+genre%3ACitation^0.01
&start=0
&rows=3
&fl=genre+title
&version=2.2
&defType=edismax

I get the same results whether I include "genre%3ACitation^0.01" or not.

Just to see if my names were correct, I put a minus sign before
"genre" and it did, in fact, stop returning all the documents
containing Citation.

What am I doing wrong?

Here are the results from the above query:

<response>
  <lst name="responseHeader">
    <int name="status">0</int>
    <int name="QTime">1</int>
    <lst name="params">
      <str name="fl">genre title </str>
      <str name="start">0</str>
      <str name="q">+content:notes genre:Citation^0.01</str>
      <str name="rows">3</str>
      <str name="version">2.2</str>
      <str name="defType">edismax</str>
    </lst>
  </lst>
  <result name="response" numFound="1276" start="0">
    <doc>
      <arr name="genre"><str>Citation</str><str>Fiction</str></arr>
      <str name="title">Notes on novelists With some other notes</str>
    </doc>
    <doc>
      <arr name="genre"><str>Citation</str></arr>
      <str name="title">Novel notes</str>
    </doc>
    <doc>
      <arr name="genre"><str>Citation</str></arr>
      <str name="title">Knock about notes</str>
    </doc>
  </result>
</response>

Reply via email to