Stratio / cassandra-lucene-index

Lucene based secondary indexes for Cassandra
Apache License 2.0
600 stars 170 forks source link

cassandra search - Returning the score of each result #405

Closed danicar12 closed 5 years ago

danicar12 commented 5 years ago

Hi,

Is there a way to expose the score of each result returned? For instance I have the following search and result:

admin@cqlsh:demo> select * from tweets where expr(tweets_index, '{filter: {type:"fuzzy", field:"body", value:"robert", boost:2.0} }');

id | body | latitude | longitude | time | user ----+----------------------------+----------+-----------+---------------------------------+-------- 5 | robert | null | null | 2018-08-31 22:00:00.000000+0000 | robert 6 | robert is working in Miami | null | null | 2018-08-31 22:00:00.000000+0000 | robert

Is there a way to get the score of each line like in an extra column or so?

thanks in advance. Daniel

danicar12 commented 5 years ago

I just saw that it is still an option to add the column lucene and get the scoring value in there. Thanks, Daniel