Hi Teague!

I configured the solrconf.xml and schema.xml exactly the way you did, only
substituting the word 'documentText' per 'content' used by the techproducts
sample, I reindex through :

 curl '
http://localhost:8983/solr/techproducts/update/extract?literal.id=pdf1&commit=true'
-F "Emmanuel=@/home/solr/dados/teste/Emmanuel.pdf"

with the same result.... no highlight in the respond as below:

"highlighting": { "pdf1": {} }

=(

Really... do not know what to do...

Thanks for your time, if you have any more suggestion where I could be
missing something... please let me know.


Best regards,

*Evert*

2015-12-16 15:30 GMT-02:00 Teague James <teag...@insystechinc.com>:

> Hi Evert,
>
> I recently needed help with phrase highlighting and was pointed to the
> FastVectorHighlighter which worked out great. I just made a change to the
> configuration to add generateWordParts="0" and generateNumberParts="0" so
> that searches for things like "1a" would get highlighted correctly. You may
> or may not need that feature. You can always remove them or change the
> value to "1" to switch them on explicitly. Anyway, hope this helps!
>
> solrconfig.xml (partial snip)
> <requestHandler name="/select" class="solr.SearchHandler">
>                 <lst name="defaults">
>                         <str name="wt">xml</str>
>                         <str name="echoParams">explicit</str>
>                         <int name="rows">10</int>
>                         <str name="df">documentText</str>
>                         <str name="hl">on</str>
>                         <str name="hl.fl">text</str>
>                         <str name="hl.useFastVectorHighlighter">true</str>
>                         <str name="hl.snippets">100</str>
>                         <str name="hl.tag.pre"><b></str>
>                         <str name="hl.tag.post"></b></str>
>                 </lst>
> </requestHandler>
>
> schema.xml (partial snip)
>    <field name="id" type="string" indexed="true" stored="true"
> required="true" multiValued="false" />
>    <field name="documentText" type="text_general" indexed="true"
> multivalued="true" termVectors="true" termOffsets="true"
> termPositions="true" />
>
> <fieldType name="text_general" class="solr.TextField"
> positionIncrementGap="100">
>         <analyzer type="index">
>                 <tokenizer class="solr.WhitespaceTokenizerFactory"/>
>                 <filter class="solr.StopFilterFactory" ignoreCase="true"
> words="stopwords.txt" />
>                 <filter class="solr.WordDelimiterFilterFactory"
> catenateAll="1" preserveOriginal="1" generateNumberParts="0"
> generateWordParts="0" />
>                 <filter class="solr.SynonymFilterFactory"
> synonyms="index_synonyms.txt" ignoreCase="true" expand="true"/>
>                 <filter class="solr.LowerCaseFilterFactory"/>
>                 <filter class="solr.PorterStemFilterFactory"/>
>                 <filter class="solr.ApostropheFilterFactory"/>
>         </analyzer>
>         <analyzer type="query">
>                 <tokenizer class="solr.WhitespaceTokenizerFactory"/>
>                 <filter class="solr.WordDelimiterFilterFactory"
> catenateAll="1" preserveOriginal="1" generateWordParts="0" />
>                 <filter class="solr.StopFilterFactory" ignoreCase="true"
> words="stopwords.txt" />
>                 <filter class="solr.LowerCaseFilterFactory"/>
>                 <filter class="solr.ApostropheFilterFactory"/>
>         </analyzer>
> </fieldType>
>
> -Teague
>
> From: Evert R. [mailto:evert.ra...@gmail.com]
> Sent: Tuesday, December 15, 2015 6:25 AM
> To: solr-user@lucene.apache.org
> Subject: Solr Basic Configuration - Highlight - Begginer
>
> Hi there!
>
> It´s my first installation, not sure if here is the right channel...
>
> Here is my steps:
>
> 1. Set up a basic install of solr 5.4.0
>
> 2. Create a new core through command line (bin/solr create -c test)
>
> 3. Post 2 files: 1 .docx and 2 .pdf (bin/post -c test /docs/test/)
>
> 4. Query over the browser and it brings the correct search, but it does
> not show the part of the text I am querying, the highlight.
>
>   I have already flagled the 'hl' option. But still it does not word...
>
> Exemple: I am looking for the word 'peace' in my pdf file (book) I have 4
> matches for this word, it shows me the book name (pdf file) but does not
> bring which part of the text it has the word peace on it.
>
>
> I am problably missing some configuration in schema.xml, which is missing
> from my folder.... /solr/server/solr/test/conf/
>
> Or even the solrconfig.xml...
>
> I have read a bunch of things about highlight check these files, copied
> the standard schema.xml to my core/conf folder, but still it does not bring
> the highlight.
>
>
> Attached a copy of my solrconfig.xml file.
>
>
> I am very sorry for this, probably, dumb and too basic question... First
> time I see solr in live.
>
>
> Any help will be appreciated.
>
>
>
> Best regards,
>
>
> Evert Ramos
>
> mailto:evert.ra...@gmail.com
>
>
>

Reply via email to