Skip to content

I'm trying to add a new document for an existing index(Clueweb09) #1931

Closed Answered by tomer92808888
tomer92808888 asked this question in Q&A
Discussion options

You must be logged in to vote

I managed to find the solution:

from pyserini.index.lucene import LuceneIndexer

args = ["-index", "data/index", "-storeDocvectors", "-storeContents"]

indexer = LuceneIndexer(append=True, args=args)

doc = "testing"
id = "clueweb09-en0000-00-327300000"

indexer.add_doc_dict({"id": id, "contents": doc})

indexer.close()

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by tomer92808888
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant