Searching within a subset of documents #227
-
I've gone over the intro2new.ipynb notebook, and I'm wondering if it is possible to accomplish the following:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The first part is easy. The passages you pass to the indexer either already have them from the TSV or are given a sequential ID. TSV Format we use: So, you don't get the passage IDs from the indexer. You give the passage IDs to the indexer. That way you know them. The second part is best done with filtering. I'm assuming you have some way to do the subsetting. We do that with page metadata. Here's the search line to pass a filtering function:
The |
Beta Was this translation helpful? Give feedback.
The first part is easy. The passages you pass to the indexer either already have them from the TSV or are given a sequential ID.
TSV Format we use:
[ID] \t [Passage Text] \t [Passage title / other meta data]
So, you don't get the passage IDs from the indexer. You give the passage IDs to the indexer. That way you know them.
The second part is best done with filtering. I'm assuming you have some way to do the subsetting. We do that with page metadata. Here's the search line to pass a filtering function: