This is totally weird. The document cache should really have nothing
to do with whether MLT returns documents or not AFAIK. So either I'm
totally misunderstanding MLT, you're leaving out a step or there's
some bug in Solr. The fact that setting the document cache to 0
changes the behavior, or restarting Solr and submitting the exact same
request gives different behavior is strong evidence it's a problem
with Solr.

Could I ask you to open a JIRA and add all the relevant details you
can? Especially if you could get it to work (well actually fail) with
the techproducts data. But barring that, the (perhaps sanitized)
queries you send to get diff results before and after.

Best,
Erick

On Fri, May 29, 2015 at 7:10 AM, Bryan Bende <bbe...@gmail.com> wrote:
> Thanks Erik. I realize this really makes no sense, but I was looking to
> work around a problem. Here is the scenario...
>
> Using Solr 5.1 we have a service that utilizes the new mlt query parser to
> get recommendations. So we start up the application,
> ask for recommendations for a document, and everything works.
>
> Another feature is to "dislike" a document, and once it is "disliked" it
> shouldn't show up as a recommended document. It
> does this by looking up the disliked documents for a user and adding a
> filter query to the recommendation call which excludes
> the disliked documents.
>
> So now we dislike a document that was in the original list of
> recommendations above, then ask for the recommendations again,
> and now we get nothing back. If we restart Solr, or reload the collection,
> then we can get it to work, but as soon as we dislike another
> document we get back into a weird state.
>
> Through trial and error I narrowed down that if we set the documentCache
> size to 0, then this problem doesn't happen. Since we can't
> really figure out why this is happening in Solr, we were hoping there was
> some way to not use the document cache on the call where
> we use the mlt query parser.
>
> On Thu, May 28, 2015 at 5:44 PM, Erick Erickson <erickerick...@gmail.com>
> wrote:
>
>> First, there isn't that I know of. But why would you want to do this?
>>
>> On the face of it, it makes no sense to ignore the doc cache. One of its
>> purposes is to hold the document (read off disk) for successive
>> search components _in the same query_. Otherwise, each component
>> might have to do a disk seek.
>>
>> So I must be missing why you want to do this.
>>
>> Best,
>> Erick
>>
>> On Thu, May 28, 2015 at 1:23 PM, Bryan Bende <bbe...@gmail.com> wrote:
>> > Is there a way to the document cache on a per-query basis?
>> >
>> > It looks like theres {!cache=false} for preventing the filter cache from
>> > being used for a given query, looking for the same thing for the document
>> > cache.
>> >
>> > Thanks,
>> >
>> > Bryan
>>

Reply via email to