Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

SOLR example

By: iotashan on Apr 22nd, 2011  |  syntax: ColdFusion  |  size: 0.50 KB  |  views: 220  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  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));