term_vector parameter at doc.json.

(from github.com/anatomo)
I want to try some term_vector parameter at doc.json.
https://www.elastic.co/guide/en/elasticsearch/reference/current/term-vector.html

I changed “content” and “title” term_vector.

    "properties": {
      "anchor": {
        "type": "keyword"
      },
      "boost": {
        "type": "float"
      },
      "click_count": {
        "type": "long"
      },
      "config_id": {
        "type": "keyword"
      },
      "important_content": {
        "type": "langstring",
        "lang_field": "lang",
        "lang_base_name": "title",
        "index": false
      },
      "content": {
        "type": "langstring",
        "lang_field": "lang",
        "analyzer": "standard_analyzer",
        "term_vector": "with_offsets"
      },
      "content_minhash": {
        "type": "minhash",
        "minhash_analyzer": "minhash_analyzer",
        "copy_bits_to": "content_minhash_bits"
      },
      "content_minhash_bits": {
        "type": "keyword"
      },
          
      ...
      
      "site": {
        "type": "keyword"
      },
      "title": {
        "type": "langstring",
        "lang_field": "lang",
        "analyzer": "standard_analyzer",
        "term_vector": "with_offsets"
      },
      "thumbnail": {
        "type": "keyword"
      },
      "url": {
        "type": "keyword"
      }
    }

I reindex with updating aliases, and deleted old index.
Then, the search result showed nothing.
(Timeout?)

The “term_vector”: “with_positions_offsets” was worked good.
But, other settings looks not working.

Could you please advise anything?

(from github.com/marevol)
Did you check log files?

(from github.com/anatomo)
I checked the fess.log.
But, I couldn’t find the reasons.
fess.log

(from github.com/marevol)
How about changing

query.highlight.type=postings

in fess_config.properties?
fvh needs “with_positions_offsets”.

(from github.com/anatomo)
I tried it.
But, the result didn’t change anything…

(from github.com/marevol)
I think the following message disappears…

Caused by: java.lang.IllegalArgumentException: the field [content] should be indexed with term vector with position offsets to be used with fast vector highlighter

(from github.com/anatomo)
The message disappeared.
But I found similer messages in fess.log

2017-12-21 17:33:20,570 [elasticsearch[Node 1][search][T#2]] DEBUG [101] Failed to execute fetch phase
org.elasticsearch.transport.RemoteTransportException: [Node 1][127.0.0.1:9301][indices:data/read/search[phase/fetch/id]]
Caused by: java.lang.IllegalArgumentException: the field [content] should be indexed with positions and offsets in the postings list to be used with postings highlighter
	at org.elasticsearch.search.fetch.subphase.highlight.PostingsHighlighter.highlight(PostingsHighlighter.java:58) ~[elasticsearch-5.6.3.jar:5.6.3]
	at org.elasticsearch.search.fetch.subphase.highlight.HighlightPhase.hitExecute(HighlightPhase.java:125) ~[elasticsearch-5.6.3.jar:5.6.3]
	at org.elasticsearch.search.fetch.FetchPhase.execute(FetchPhase.java:165) ~[elasticsearch-5.6.3.jar:5.6.3]
	at org.elasticsearch.search.SearchService.executeFetchPhase(SearchService.java:426) ~[elasticsearch-5.6.3.jar:5.6.3]
	at org.elasticsearch.action.search.SearchTransportService$12.messageReceived(SearchTransportService.java:407) ~[elasticsearch-5.6.3.jar:5.6.3]
	at org.elasticsearch.action.search.SearchTransportService$12.messageReceived(SearchTransportService.java:404) ~[elasticsearch-5.6.3.jar:5.6.3]
	at org.elasticsearch.transport.RequestHandlerRegistry.processMessageReceived(RequestHandlerRegistry.java:69) ~[elasticsearch-5.6.3.jar:5.6.3]
	at org.elasticsearch.transport.TransportService$7.doRun(TransportService.java:644) [elasticsearch-5.6.3.jar:5.6.3]
	at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:638) [elasticsearch-5.6.3.jar:5.6.3]
	at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37) [elasticsearch-5.6.3.jar:5.6.3]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_60]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_60]
	at java.lang.Thread.run(Thread.java:745) [?:1.8.0_60]

(from github.com/marevol)
It might be better to be plain…
See Highlighting.

(from github.com/anatomo)
It works good.
Thank you.