Help with BrowseHit getField

20 views
Skip to first unread message

Ariel Valentin

unread,
Mar 14, 2013, 6:05:50 PM3/14/13
to bobo-...@googlegroups.com
Hello!

I want to figure out a way to efficiently return field values for all matching BrowseHits. I do not want to use the stored values because in the past we have run into considerable issues with I/O. Based on reading the documentation and reading through the source code, it appears that the FieldValues are set by FacetHandlers. I have tried using SimpleFacetHandler however when I do so the search time slows down considerably (from 464ms to 8000ms on average). 

That makes me feel like I am missing something. Is there an easier/faster way to do this? 




John Wang

unread,
Mar 14, 2013, 11:40:49 PM3/14/13
to bobo-...@googlegroups.com
Hi Ariel:

     This does not sound right. Returning value from facethandler should be very fast. Would you mind paste your code so we help?

-John





--
You received this message because you are subscribed to the Google Groups "bobo-browse" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bobo-browse...@googlegroups.com.
To post to this group, send email to bobo-...@googlegroups.com.
Visit this group at http://groups.google.com/group/bobo-browse?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Ariel Valentin

unread,
Mar 15, 2013, 2:23:40 PM3/15/13
to bobo-...@googlegroups.com
John,

Thanks for your help. I created a Gist that contains the relevant part of the search code here: https://gist.github.com/arielvalentin/d737007c29fa60e7f07f
  1. We construct a BrowseRequest that contains relevant user requested information
  2. We then create a Browser using an indexReader
    • BoboBrowser(BoboIndexReader.getInstance(indexReader));
    • browser.setFacetHandler(new SimpleFacetHandler(DocumentField.Guid.getFieldName()));
  3. Lastly we convert the BrowseResult into our own SearchResult type

One thing I noticed after we reviewed this code is that I do not close the BoboBrowser so I am going to add that today and see what happens.

John Wang

unread,
Mar 15, 2013, 11:04:02 PM3/15/13
to bobo-...@googlegroups.com
Ah, the problem is clear, you are creating a BoboIndexReader from the line 37: browser = new BoboBrowser(BoboIndexReader.getInstance(indexReader));

per request. That is very expensive.

You should keep an instance of BoboIndexReader around for all search request.

Let me know if this works better for you.

-John

Ariel Valentin

unread,
Mar 29, 2013, 1:35:07 PM3/29/13
to bobo-...@googlegroups.com
I better get on that then.
Reply all
Reply to author
Forward
0 new messages