<div dir="ltr">It's relatively simple from the crane side. You just need to make a subclass of SearchBackend:<div><br></div><div><a href="https://github.com/pulp/crane/blob/python-crane-2.1.0-1/crane/search/base.py#L14" target="_blank">https://github.com/pulp/crane/<wbr>blob/python-crane-2.1.0-1/<wbr>crane/search/base.py#L14</a></div><div><br></div><div>And  probably you'll want to use the HTTPBackend found below it. It's mostly just a matter of figuring out how to pass a search query to forman, and how to convert whatever results it gives you into SearchResult instances. Focus on just implementing your own search() method that does this, and use the other methods if/when they are useful.</div><div><br></div><div>The two examples, for Solr and Google Search Appliance, are good examples of how it should work.</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, May 29, 2017 at 9:42 PM, Tom McKay <span dir="ltr"><<a href="mailto:thomasmckay@redhat.com" target="_blank">thomasmckay@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Some months back I set up a solr search provider for crane[1]. I set up a repeating task in foreman[2] to populate solr with the latest repository information. As I was doing this, though, it seemed that it would make more sense to have crane query foreman directly for the information. Is there anyone familiar with search integration with crane that could guide me in setting up foreman as a provider?<br><br><br>[1] <a href="http://docs.pulpproject.org/en/nightly/plugins/crane/index.html?highlight=crane#solr" target="_blank">http://docs.pulpproject.org/<wbr>en/nightly/plugins/crane/<wbr>index.html?highlight=crane#<wbr>solr</a><br>[2] <a href="https://theforeman.org/plugins/katello/" target="_blank">https://theforeman.org/<wbr>plugins/katello/</a><br></div>
<br>______________________________<wbr>_________________<br>
Pulp-dev mailing list<br>
<a href="mailto:Pulp-dev@redhat.com">Pulp-dev@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/pulp-dev" rel="noreferrer" target="_blank">https://www.redhat.com/<wbr>mailman/listinfo/pulp-dev</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><p style="color:rgb(0,0,0);font-family:overpass-mono,monospace;font-size:10px;margin:0px!important;padding:0px!important"><span style="margin:0px!important;padding:0px!important">Michael</span> <span style="margin:0px!important;padding:0px!important">Hrivnak</span></p><p style="color:rgb(0,0,0);font-family:overpass-mono,monospace;font-size:10px;margin:0px!important;padding:0px!important"></p><span style="color:rgb(0,0,0);font-family:overpass-mono,monospace;font-size:10px;margin:0px!important;padding:0px!important"><span style="margin:0px!important;padding:0px!important">Principal Software Engineer</span><span style="margin:0px!important;padding:0px!important">, <span style="margin:0px!important;padding:0px!important">RHCE</span></span> </span><span style="color:rgb(0,0,0);font-family:overpass-mono,monospace;font-size:10px"></span><br style="color:rgb(0,0,0);font-family:overpass-mono,monospace;font-size:10px;margin:0px!important;padding:0px!important"><p style="color:rgb(0,0,0);font-family:overpass-mono,monospace;font-size:10px;margin:0px!important;padding:0px!important">Red Hat</p></div></div>
</div>