Thanks a lot for your help. TicketIndexer is really helpful for my issue. I noticed than I can’t initialise TicketIndexer in the Python interpreter (due to the same runtime error I mentioned earlier), but I can test it when running it on the server (through match_request and process_request), so that’s not a problem for now.
Antonia On 11 June 2014 at 07:41:42, Anže Starič ([email protected]) wrote: On Wed, Jun 11, 2014 at 1:46 AM, Antonia Horincar <[email protected]> wrote: > Hi, > > Is there a way to retrieve all the attributes of a BH resource? For example, > I am working on storing tickets in the Solr index, and I need to create a > dictionary mapping each ticket field type to its value. This sounds similar to what TicketIndexer [1] does. It converts tickets to dictionaries mapping field names to their values. If your Solr search implements ISearchBackend [2], its add_doc method will get the dict created by TicketIndexer and you don't have to do the conversion yourself. Anze [1] https://github.com/apache/bloodhound/blob/trunk/bloodhound_search/bhsearch/search_resources/ticket_search.py#L45 [2] https://github.com/apache/bloodhound/blob/trunk/bloodhound_search/bhsearch/api.py#L94
