Note that there are some explanatory texts on larger screens.

plurals
  1. POZend Lucene misbehaving: Queries work one by one but not together
    primarykey
    data
    text
    <p>Ok, so here's the deal: Lucene does the weirdes things to me. Everything is indexed properly, everything works, everything's fast etc etc.</p> <p>So I search for a category in English. Hundreds of results pop out.</p> <p>So I search for a country in English. Hundred of results pop out.</p> <p>So I search for a category AND a country in English. A combination that I KNOW is valid. I get jack. Nothing. Zip.... Why?</p> <pre><code>Zend_Search_Lucene_Analysis_Analyzer::setDefault(new Zend_Search_Lucene_Analysis_Analyzer_Common_TextNum_CaseInsensitive()); $index = Library_Search_Lucene::open(SearchIndexer::getIndexDirectory()); $query = new Zend_Search_Lucene_Search_Query_Boolean(); $queryString = new Zend_Search_Lucene_Search_Query_MultiTerm(); $queryString-&gt;addTerm(new Zend_Search_Lucene_Index_Term('lang' . $language, 'langSite')); $query-&gt;addSubquery($queryString, true); if (isset($idCategory)) { $queryCategory = new Zend_Search_Lucene_Search_Query_MultiTerm(); $queryCategory-&gt;addTerm(new Zend_Search_Lucene_Index_Term($idCategory, 'idCategory')); $query-&gt;addSubquery($queryCategory, true); } if (isset($country)) { $queryLocation = new Zend_Search_Lucene_Search_Query_MultiTerm(); $queryLocation-&gt;addTerm(new Zend_Search_Lucene_Index_Term($country, 'locationsClean')); $query-&gt;addSubquery($queryLocation, true); } $hits = $index-&gt;find($query); </code></pre> <p>$query->getQueryTerms() returns a valid array of terms. There are no errors. What the hell am I doing wrong?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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