0

Following are two example sentences.

(1) Within a year Microsoft licensed MS-DOS to over 70 other companies. It was designed to be an OS that could run on any 8086-family computer.

(2) Within a year Microsoft license MS-DOS to over 70 other companies. It was designed to be an OS that could run on any 8086-family computer. Each computer would have its own distinct hardware and its own version of MS-DOS.

When searching Microsoft as the input search text, (1) is getting a higher rank than the (2) because (1) has a lower content.

When searching license as the input search text, best match is in (2). Since (1) has a smaller content than the (2), will output a higher rank for (1).

Is there any way to get the ranking of the exact match without looking at the content? Any solutions?

  • Are you using BM25? – CL. May 25 '17 at 09:05
  • Yes I'm using BM25(). Default ranking method is BM25() right? Is there any other way to get the ranking without referring to the content? – Chamitha Narawita May 25 '17 at 09:14
  • What do you mean with "default"? Show the actual query you're using. – CL. May 25 '17 at 09:18
  • This is the Query : SELECT column1, rank FROM FullTextSearchTable WHERE FullTextSearchTable MATCH 'serchText*' ORDER BY rank – Chamitha Narawita May 25 '17 at 09:20
  • > All FTS5 tables feature a special hidden column named "rank". If the current query is not a full-text query (i.e. if it does not include a MATCH operator), the value of the "rank" column is always NULL. Otherwise, in a full-text query, column rank contains by default the same value as would be returned by executing the bm25() auxiliary function with no trailing arguments. https://sqlite.org/fts5.html#sorting_by_auxiliary_function_results – Matt Votsikas McLean Jun 13 '17 at 13:15

0 Answers0