[Pulp-dev] Setting up solr with crane for docker search

Tom McKay thomasmckay at redhat.com
Sat Jan 28 12:21:36 UTC 2017


I can find nothing about solr that would indicate the results I'm seeing
versus the expected.
http://yonik.com/solr-json-request-api/


On Sat, Jan 28, 2017 at 6:42 AM, Tom McKay <thomasmckay at redhat.com> wrote:

> BTW, I figured it out with some help.
>
> The fields necessary in solr json search results have examples in the
> crane tests[1]. Unfortunately, the version of solr I'm using, 6.4.0, has
> results that by default are formatted differently. Where crane expects
> "ir_stars:7", solr is returning "ir_stars:[7]". I am unsure why this is the
> case, nor do I know how to change the solr json results format. When I
> modified crane to parse the results, I could successfully docker search.
>
>
>
>
> [1] https://github.com/pulp/crane/blob/67503493a2af22ea809f0880dd11b3
> b76f908a15/tests/search/test_solr.py#L346-L358
> [2] https://github.com/pulp/crane/blob/67503493a2af22ea809f0880dd11b3
> b76f908a15/crane/search/solr.py#L48
>
> On Fri, Jan 27, 2017 at 3:38 PM, Michael Hrivnak <mhrivnak at redhat.com>
> wrote:
>
>> You found the missing link. Both search backends were designed to work
>> for a particular user that already had the data populated into either GSA
>> or solr. We don't provide any means for getting that data populated.
>>
>> That said, search is not a very useful feature of docker. You can only
>> search for repositories, and can only see a few tens of characters of text
>> about each one. That's not nearly enough to help you decide if you want to
>> use a particular repository, unless you just need to be reminded of the
>> name of a repository you previously researched and decided to use.
>>
>> Michael
>>
>> On Fri, Jan 27, 2017 at 2:28 PM, Tom McKay <thomasmckay at redhat.com>
>> wrote:
>>
>>> Does anyone have instructions for setting up solr for search? I am
>>> running a simple solr container[1] and have crane configured[2] to query
>>> it. However, I am missing the "data import handler" piece in solr, I think.
>>> I can see that a "docker search" successfully hits solr but has zero
>>> results.
>>>
>>> Note: This is to address several requests to allow "docker search" to
>>> work with container repositories in foreman/katello[3] and Satellite-6.
>>>
>>> Thanks!
>>>
>>> [1] https://hub.docker.com/_/solr/
>>> [2] http://docs.pulpproject.org/en/nightly/plugins/crane/index.h
>>> tml?highlight=crane#solr
>>> [3] https://theforeman.org/plugins/katello/index.html
>>>
>>> _______________________________________________
>>> Pulp-dev mailing list
>>> Pulp-dev at redhat.com
>>> https://www.redhat.com/mailman/listinfo/pulp-dev
>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/pulp-dev/attachments/20170128/c68f9854/attachment.htm>


More information about the Pulp-dev mailing list