Solr
  1. Solr
  2. SOLR-3470

Custom Carrot2 tokenizer and stemmer factories overwritten by defaults

    Details

    1. SOLR-3470.patch
      12 kB
      Dawid Weiss

      Activity

      Hide
      Stanislaw Osinski added a comment -

      Fixed in trunk and 3.6.1 branch.

      Show
      Stanislaw Osinski added a comment - Fixed in trunk and 3.6.1 branch.
      Hide
      Stanislaw Osinski added a comment -

      Unit tests pass fine, but Carrot2's internal class resolution code (context class loader) doesn't play well with how Solr loads contrib classes in webapp mode.

      A brute-force fix would be to do the class loading the Solr way in the clustering component and pass class objects instead of strings to Carrot2.

      Show
      Stanislaw Osinski added a comment - Unit tests pass fine, but Carrot2's internal class resolution code (context class loader) doesn't play well with how Solr loads contrib classes in webapp mode. A brute-force fix would be to do the class loading the Solr way in the clustering component and pass class objects instead of strings to Carrot2.
      Hide
      Dawid Weiss added a comment -

      Here's my take at solving this. I temporarily substitute the context class loader to be the one from solr's resource loader (core).

      This works (or seems to work) just fine. I don't particularly like it but I also don't want to mess with Solr's resource loaders if we don't have to.

      I also piggyback a few cleanups.

      Show
      Dawid Weiss added a comment - Here's my take at solving this. I temporarily substitute the context class loader to be the one from solr's resource loader (core). This works (or seems to work) just fine. I don't particularly like it but I also don't want to mess with Solr's resource loaders if we don't have to. I also piggyback a few cleanups.
      Hide
      Dawid Weiss added a comment -

      Review and let me know what you think.

      Show
      Dawid Weiss added a comment - Review and let me know what you think.
      Hide
      Stanislaw Osinski added a comment -

      Not pretty indeed, but still better than hardcoding Carrot2 attribute names. I'll commit this in a moment.

      Show
      Stanislaw Osinski added a comment - Not pretty indeed, but still better than hardcoding Carrot2 attribute names. I'll commit this in a moment.
      Hide
      Stanislaw Osinski added a comment -

      Dawid's patch committed to trunk and 3.6 branch.

      Show
      Stanislaw Osinski added a comment - Dawid's patch committed to trunk and 3.6 branch.
      Hide
      Uwe Schindler added a comment -

      Bulk close for 3.6.1

      Show
      Uwe Schindler added a comment - Bulk close for 3.6.1

        People

        • Assignee:
          Stanislaw Osinski
          Reporter:
          Stanislaw Osinski
        • Votes:
          0 Vote for this issue
          Watchers:
          2 Start watching this issue

          Dates

          • Created:
            Updated:
            Resolved:

            Development