OroCRM Forums

Covering OroCRM topics, including community updates and company announcements.

Forums Forums OroCRM OroCRM – Programming Questions How to add a field to search index

This topic contains 4 replies, has 2 voices, and was last updated by  Mike Kudelya 7 years, 2 months ago.

Starting from March 1, 2020 the forum has been switched to the read-only mode. Please head to StackOverflow for support.

  • Creator
    Topic
  • #25331

    ahrrikis
    Participant

    Hej,

    under https://oroinc.com/orocrm/doc/current/book/search it’s written that you can modify the indexed fields, by editing a bundles search.yml’s field section.

    After clearing the cache, and reindexing it with

    , the field doesn’t appear to be indexed in the oro_search_index tables.

    What else do I have to do, to index a new field for search?

    Thank you.

    Using OROCRM 1.10.13

Viewing 4 replies - 1 through 4 (of 4 total)
  • Author
    Replies
  • #25332

    ahrrikis
    Participant

    As far I figured out, its working, but not with reindexing.

    Now following is added to search.yml

    #25333

    Mike Kudelya
    Participant

    Hi

    Please add id column to customer relation section (in search.yml), add to customer entity getId() function, clear cache and run reindex command:

    To get more strict search, please read my post about it.

    #25334

    ahrrikis
    Participant

    Thank you for your reply.

    Unfortunately thats not resolving the problem, finally I wanted to add the customer_email field of the orders-table to the index.
    It’s working for all new synced orders, but its not working during index, so the problem is not to add the field, the problem is how to add the field so that is in the index after the reindex.

    The problem of token length and the reindex field I am aware of. Unfortunately that also reduceds the precision of the result using an email-address.

    With php and oro I didn’t figure out the solution. I added the field with a sql job to the index, as solution to enlage the precision and reduce the recall, we just skipped every token that causes tokenization in mysql fulltext search.

    #25335

    Mike Kudelya
    Participant

    I’m not really understand why your index doesn’t appear in oro_search_index_* tables after reindex. I have tried add customer id to index and after reindex i found it in oro_search_index_text

Viewing 4 replies - 1 through 4 (of 4 total)

The forum ‘OroCRM – Programming Questions’ is closed to new topics and replies.

Back to top