Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove a field after indexing #103

Open
FranckFreiburger opened this issue Mar 6, 2019 · 0 comments
Open

remove a field after indexing #103

FranckFreiburger opened this issue Mar 6, 2019 · 0 comments

Comments

@FranckFreiburger
Copy link

Hello,
Is it possible to remove a field once it has been indexed ?

my document is:

- index
- content
- pageNum
- filename

my index config:

this.setRef('index');
this.addField('content');
this.saveDocument(true);

Since I have multiple big files, I want to reduce memory (and disk space) usage.
My need is to find a filemane/pageNum from a word (in content), and I never need content after indexing.

I tried this (with success):

	for ( var id in idx.documentStore.docs )
		delete idx.documentStore.docs[id].content;

but I wondering if there is a better way to achieve this with the public API.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant