Skip to content
This repository has been archived by the owner on Aug 30, 2022. It is now read-only.

Highlighting for Conversation Search #121

Closed
westei opened this issue Oct 23, 2017 · 7 comments
Closed

Highlighting for Conversation Search #121

westei opened this issue Oct 23, 2017 · 7 comments
Assignees
Milestone

Comments

@westei
Copy link
Member

westei commented Oct 23, 2017

Add support for highlighting to the conversation search. Extend the search result format to include highlight information like with Solr search results

@westei
Copy link
Member Author

westei commented Oct 24, 2017

This will require to delete and re-index the conversation index on the software update

westei added a commit that referenced this issue Oct 25, 2017
…e of that I added a multi valued field `messages` to be used to index the content of all messages of a conversation
westei added a commit that referenced this issue Oct 25, 2017
tkurz pushed a commit that referenced this issue Nov 7, 2017
ja-fra added a commit that referenced this issue Nov 30, 2017
Highlighting implementation for the conversation search (closes #121)
@ruKurz ruKurz added ready and removed in review labels Dec 7, 2017
@ruKurz
Copy link
Collaborator

ruKurz commented Dec 7, 2017

The results of Smarti do not fit to ChatPal Search:

chatpal-search fails by executing:

/packages/chatpal-search/server/service/search_service.js

static alignResponse(result) {
  const docs = [];
  result.response.forEach(function(doc) {
    docs.push({
      type: doc.type,
      subtype: 'c',
      room: doc.meta_channel_id[0],
      id: doc.message_id,
      text: doc.message,
      highlight_text: result.highlighting[doc.id] ? result.highlighting[doc.id].message[0] : undefined,
      user: doc.user_id,
      date: doc.time
    });

    return {
      numFound: result.meta.numFound,
      start: result.meta.start,
      docs
    };
  }
});

The Smarti response of:
http://localhost:8080/rocket/localhost/search?sort=time%20desc&fl=id,message_id,meta_channel_id,user_id,time,message,type&hl=true&hl.fl=message&df=message&q=braunschweig

does not return the JSON-Format expected by chatpal search.
E.g.

  • result.response is undefined
  • the requested return fields: id,message_id,meta_channel_id,user_id,time,message,type do not persist in the response of Smarti

Not quiet sure if this has to be solved within chatpal or within Smarti.

@westei
Copy link
Member Author

westei commented Dec 11, 2017

@ruKurz Have you deleted the 0.6.0 Solr Index before installing 0.6.1 RC1. If not this might be because we had to change the conversation index layout to support chatpal.

NOTE: with 0.6.1 RC2 the index will be fully rebuild on every startup (see #164) to avoid problems like this

@ruKurz
Copy link
Collaborator

ruKurz commented Dec 12, 2017

works when using the right endpoint: http://localhost:8080/rocket/localhost/search-message

@ruKurz
Copy link
Collaborator

ruKurz commented Dec 12, 2017

when switching to the Rocket.Chat Admin, there is a display/layout issue: While the RC-Chat panel gets shadowed, the search box of chatpal is in front.

How do we handle chapal-search RC related issues that are regarding our releases?
Should we create issues here?

@ruKurz
Copy link
Collaborator

ruKurz commented Dec 12, 2017

@tkurz could you please test chatpal-search?

@ruKurz
Copy link
Collaborator

ruKurz commented Dec 12, 2017

Can't reproduce that issue anymore

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants