SHARE
TWEET

SOLR example

iotashan Apr 22nd, 2011 233 Never
  1. params = arrayNew(1);
  2.  
  3. arrayAppend(params,{name="qt",value="dismax"});
  4. arrayAppend(params,{name="start",value=0});
  5. arrayAppend(params,{name="rows",value=50});
  6. arrayAppend(params,{name="sort",value="dateAdded desc"}); // show newest first
  7. arrayAppend(params,{name="fl",value="beerID,score"});
  8. arrayAppend(params,{name="q",value=ARGUMENTS.q});
  9. arrayAppend(params,{name="fq",value="dateAdded:[2010-08-01 TO *]"}); // only show august or newer
  10.  
  11. results = deserializeJSON(REQUEST.solr.search(params));
RAW Paste Data
Top