Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>As pointed out in the stack overflow comments, your browser query is different than your php client based query - to remove that from the equation you should test with this corrected. To get the same results as the browser based query you're php code should have looked something like this:</p> <pre><code>$solr = new Apache_Solr_Client(...); $searchOptions = array( 'sort' =&gt; 'mod_date desc' ); $results = $solr-&gt;search("bmw", 0, 10, $searchOptions); </code></pre> <p>Instead, I imagine it looks more like:</p> <pre><code>$searchOptions = array( 'fq' =&gt; 'category:"Bilar" + car_action:Sälje', 'sort' =&gt; 'mod_date desc' ) $solr-&gt;search("\*:*", 0, 10, $searchOptions); </code></pre> <p>What I expect you to see is that php client results will be the same as the browser based results, and I imagine the same would happen if you did it the opposite way - take your current parameters from the php client and applied them correctly to the browser based query.</p> <p>Now onto your problem, you don't see documents sorted properly. </p> <p>I would try this query, which is the equivalent of the php client based code:</p> <pre><code>http://localhost:8983/solr/select/?&amp;q=%2A%3A%2A&amp;fq=+category%3A%22Bilar%22+%2B+car_action%3AS%C3%A4ljes&amp;sort=mod_date+desc </code></pre> <p>versus this query, which moves the filter query into the main query:</p> <pre><code>http://localhost:8983/solr/select/?&amp;q=+category%3A%22Bilar%22+%2B+car_action%3AS%C3%A4ljes&amp;sort=mod_date+desc </code></pre> <p>and see if there is a difference. If there is, then it might be a bug in how results from cached filtered queries are used and sorted by solr - which wouldn't be a problem with the client, but the solr service itself. </p> <p>Hope this gets you closer to an anser.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload