Prioritizing JSONL Files in Imports by Adding a Ranking

TLDR andy sought advice on applying different importance levels for imported JSONL files. Kishore Nallan suggested ranking the files by creating a 'priority' field. andy implemented the advice successfully.

Photo of andy
andy
Mon, 12 Dec 2022 07:02:11 UTC

i am trying to expand my import jsonl to use 4 different files. but i want to make the 1st the most important in the results with the 2nd, 3rd and 4th files increasingly less important. So can i add a ranking into the jsonl files, if so, can you please point me to the docs for this, i cant find an example of adding this in the docs

Photo of Kishore Nallan
Kishore Nallan
Mon, 12 Dec 2022 07:05:52 UTC

Add a `priority` field to the documents. It can be different value for documents in each import file. Then, during search you can sort by this priority field to affect the ranking.

Photo of andy
andy
Mon, 12 Dec 2022 07:06:46 UTC

gotcha, i just make a field called priority and index it :slightly_smiling_face: simples, thanks, i was making it more complex than i needed to

Photo of andy
andy
Mon, 12 Dec 2022 07:07:22 UTC

1st file - 100 2nd - 75 3rd - 50 4th - 25

Photo of Kishore Nallan
Kishore Nallan
Mon, 12 Dec 2022 07:07:37 UTC

Yup

Photo of andy
andy
Mon, 12 Dec 2022 07:07:49 UTC

easy :slightly_smiling_face:

Photo of andy
andy
Mon, 12 Dec 2022 17:50:06 UTC

Kishore, this worked! i had issues with importing json which said NULL, so i removed the null values from the db