lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erick Erickson <>
Subject Re: Multiple Queries
Date Tue, 28 Apr 2009 21:04:35 GMT
Have you considered indexing the reviews along with the hotels right
in the hotel index? That way you would fetch the reviews right along with
the hotels...

Really, this is another way of saying "flatten your data" <G>...

Your idea of holding all the hotel reviews in memory is also viable,
depending upon
how many there are. you'd pay some startup costs, but that's what caching is

Given your current index structure, have you tried collecting the hotel IDs,
submitting a query to your review index that just ORs together all the IDs
then parsing that rather than calling your review index for one hotel ID at
a time?


On Tue, Apr 28, 2009 at 4:32 PM, Ankush Goyal <>wrote:

> Hi,
> I have been trying to solve a performance issue: I have an index of hotels
> with their ids and another index of reviews. Now, when someone queries for a
> location, the current process gets all the hotels for that location.
> And, then corresponding to each hotel-id from all the hotel documents, it
> calls the review index to fetch reviews associated with that particular
> hotel and so on it repeats for all the hotels. This process slows down the
> request significantly.
> I need to accumulate reviews according to corresponding hotel-ids, so I
> can't just fetch all the reviews for all the hotel ids and show them. Now, I
> was thinking about fetching all the reviews for all the hotel-ids and then
> parse all those reviews in one go and create a map with hotel-id as key and
> list of reviews as values.
> Can anyone comment on whether this procedure would be better or worse, or
> if there's better way of doing this?
> --Ankush Goyal

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message