Jump to content

Text Snippet: does it always show the search term used in the search?

Lucky H

Recommended Posts

I'm looking to provide a quick glance as to why a certain document was identified as containing a search term. The idea is to create a CSV export with a number of relevant fields, and provide a "context excerpt" from the document, showing text around the search term hit, as other applications do. 

I thought Text Snippet could be that field; however, it seems that the field is always populated from the beginning of the document and not necessarily will have the corresponding search hit on it.

Is there any other way to provide the text context in a CSV type of export or a report of some sort? I could not find it in the documentation, but i might have missed it. Would a load file do it?


Link to comment
Share on other sites

Guest Marco de Moulin

Hello @Lucky H,

Thank you for reaching out with your query. I understand that you are looking to create a CSV export that includes a "context excerpt" from the document, showing text around the search term hit. You are correct in noting that the Text Snippet field might not always capture the corresponding search hit.

When you use a crawler script for this you would need to re-index everything. Therefore, I suggest an alternative approach:

  1. Identify the relevant items in your case.
  2. Export their texts using the -exportText command line option via IntellaCmd.exe. For example:
    ./IntellaCmd.exe -user marco -case 'C:\Cases\Sample Case\' -matchQuery "test" -exportText -exportDir 'C:\Temp\'

    For more options see the manual on this topic.

  3. Write a Python script that will go through these texts and create a CSV file with columns like Item ID and Context Excerpt.
  4. Import this CSV as an overlay file to create a custom column.

This method should be faster and more efficient compared to re-indexing the whole case.

The challenge remains in defining the "context excerpt". Depending on the file type, a paragraph might suffice, but sometimes additional context is required. This is an aspect we cannot provide specific advice on. Experimenting to see what works best is the most effective approach here.

I hope this information gives you an idea of what you could do.


Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...