Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Percolatorを用いたカテゴリ分類

 Percolatorを用いたカテゴリ分類

INA Lintaro

August 02, 2018
Tweet

More Decks by INA Lintaro

Other Decks in Programming

Transcript

  1. :

  2. Percolator (Scala) createIndex(MainIndex).mappings( mapping("issue_item_query") fields percolatorField("query")) val query = issueItem.query.toCategorizingQuery.toFilteredQuery

    register(query) into(MainIndex / "issue_item_query", "query") withId issueItemId.toPercolatorId search(MainIndex / "issue_item_query") query { percolateQuery("entry", "query") usingSource entry.toEsEntry.toJsonString }
  3. Percolator (API) PUT /MainIndex/issue_item_query { "mappings": { "_doc": { "properties":

    { "query": { "type": "percolator" } } } } } PUT /MainIndex/issue_item_query/issueItemId { "query": query } GET /MainIndex/issue_item_query/_search { "query": { "percolate": { "document_type": "entry", "field": "query", "document": entry } } }
  4. ◮ ◮ ◮ ? ( kuromoji ) ◮ ◮ →

    ◮ ◮ ◮ Percolator ◮ Percolator ? ◮