3

I am trying to understand the logic behind the order of results of a cloudant search feature.

When I make some search query in my Cloudant DB, I get, for example, the following result:

{"total_rows":3,
"bookmark":"g1AAAAGieJzLYWBgYMtgTmGQS0lKzi9KdUhJMtLLTMo1MLDUS87JL0",
"rows":[
  {
     "id":"a13cad998851cd8428e84388b113d972",
     "order":[
        8.46020221710205,
        494
     ],
     "fields":{
        "SLP_NOME":"CF-PL-1527-2011",
     }
  },
  {
     "id":"5a131a5eb363dc8c2f162499d9fcb810",
     "order":[
        8.449498176574707,
        483
     ],
     "fields":{
        "SLP_NOME":"CF-PL-1529-2011",
     }
  },
  {
     "id":"3bc1a4fe211305cba1e558e963327a6f",
     "order":[
        8.077779769897461,
        1967
     ],
     "fields":{
        "SLP_NOME":"CF-PL-5094-2013",
     }
  }
]}

I know that the first value is the relevance result results.rows[x].order[0]. It is the default sort parameter.

However, What is the meaning of the second value results.rows[x].order[1]?

The only info that I could get was:

order: Specifies the order with regard to the indexed fields

https://docs.cloudant.com/api/search.html

But I did not understand. What do they mean with "regard to the indexed value"?

THanks!

Danilo Oliveira
  • 280
  • 2
  • 12
  • FWIW I'm trying to wrap my head around the same thing and have begun by looking at the Lucene documentation itself. This seems to be a good place to start to learn about how scores are calculated. I've not found the elusive "order" parameter yet though...http://lucene.apache.org/core/4_0_0/core/org/apache/lucene/search/package-summary.html#scoring – SonarJetLens May 21 '15 at 08:04

0 Answers0