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

Solr results returns contents of files and pages #103

Open
torleif opened this issue Dec 2, 2015 · 5 comments
Open

Solr results returns contents of files and pages #103

torleif opened this issue Dec 2, 2015 · 5 comments

Comments

@torleif
Copy link
Contributor

torleif commented Dec 2, 2015

The solr extension is configured to return all indexed fields. This is redundant as only class name, ID, and a few others are needed. returning a large file will cause memory exceeded errors on some large files.

@dhensby
Copy link
Contributor

dhensby commented Apr 5, 2018

Interesting; @torleif do you have any suggestions as to how we could fix this? Would you be willing to submit a PR?

@torleif
Copy link
Contributor Author

torleif commented Apr 5, 2018

there's a way to tell solr to only return some fields. but forcing it to not return content for files, but for database indexes might be a bit of a challenge.

our solution was pretty heavy handed and we just removed all files from our index.

I'm willing to do a PR, but i've promised PRs in the past and not had time to do them :(

@emteknetnz
Copy link
Member

Hi, can you still remember this one? Can you remember what was causing the memory to be exceeded? Was it the XML results returned by Apache_Solr, or was it the contents of 100 File DataObjects?

@torleif
Copy link
Contributor Author

torleif commented Apr 3, 2020

Hi @emteknetnz

The problem was the XML returned by Solr contained the file contents. If your search result happened to have one 200MB file, or say four 50MB files, it would exceed the PHP memory limit and cause an error.

I wanted to write a patch that would tell Solr to not return the file contents (after all, only the title, ID and summary are needed).

@emteknetnz
Copy link
Member

OK, do you know where we could make code change, would it happen within one of the SolrService / SolrService_Core / Solr4Service_Core type of classes? Are you able to do a PR for this?

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

No branches or pull requests

4 participants