On 10/19/07, Chris Hostetter <[EMAIL PROTECTED]> wrote:
> (it doesn't matter that parseSort
> returns null when the sort string is just "score" ... SolrIndexSearcher
> recognizes a null Sort as being the default sort by score)
Yep... FYI, I did this early on specifically because "no sort" and
"sco
: Besides the typo :), the only problem for what I want is the fact that it
: returns null for a default score sort instead of setting
: SortField.FIELD_SCORE. I want a default score desc sort, but I want the
: scores from the lucene Hits object. Is the only way to get score values to
: modify th
Ah ha, perfect. That worked brilliantly. In case anyone is interested,
it turns out that defining "id score" as the field list for the standard
request handler in solrconfig.xml does the same thing.
explicit
id score
Thanks for the help
I believe that keeping you code as is but initializing the query parameters
should do the trick:
HashMap params = new HashMap();
params.add("fl", "id score"); // field list is id & score
...
Regards
John Reuning-2 wrote:
>
> My first pass was to implement the embedded solr example:
>
> --
So, I found the following in QueryParsing::parseSort
if( "score".equals(part) ) {
if (top) {
// If thre is only one thing in the list, just do the regular
thing...
if( parts.length == 1 ) {
return null; // do normal scoring...
}
My first pass was to implement the embedded solr example:
--
MultiCore mc = MultiCore.getRegistry();
SolrCore core = mc.getCore(mIndexName);
SolrRequestHandler handler = core.getRequestHandler("");
HashMap params = new HashMap();
SolrQueryRequest request = new LocalSolrQueryRequest(core
: The scores list in DocIterator is null after a successful query. There's a
: flag in SolrIndexSearcher, GET_SCORES, that looks like it should trigger
: setting the scores array for the resulting DocList, but I can't figure out how
: to set it. Any suggestions? I'm using the svn trunk code.
Ca