mirror of
https://github.com/Steffo99/patched-porobot.git
synced 2024-12-23 01:54:22 +00:00
Boost code
and name
fields, while lowering slightly flavor
This commit is contained in:
parent
e59856c656
commit
8cc200b6f4
1 changed files with 4 additions and 2 deletions
|
@ -1,6 +1,6 @@
|
|||
//! Module defining a search engine to find [Card]s.
|
||||
|
||||
use tantivy::{Document, Index, IndexReader, IndexWriter};
|
||||
use tantivy::{Document, Index, IndexReader, IndexWriter, Score};
|
||||
use tantivy::collector::TopDocs;
|
||||
use tantivy::query::{QueryParser, QueryParserError};
|
||||
use tantivy::schema::{Field, NumericOptions, Schema, TextOptions};
|
||||
|
@ -271,7 +271,9 @@ impl CardSearchEngine {
|
|||
]
|
||||
);
|
||||
parser.set_conjunction_by_default();
|
||||
// parser.set_field_boost();
|
||||
parser.set_field_boost(fields.code, 3.0);
|
||||
parser.set_field_boost(fields.name, 3.0);
|
||||
parser.set_field_boost(fields.flavor, 0.7);
|
||||
parser
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue