Reputation: 35
I have a field defined as such within schema.xml:
<field name="ImageThumbnail" type="string" indexed="false" stored="true" required="false" />
I am storing a Base64 string representation of the image thumbnail inside the document, so our search results screen can render these thumbnails. This works great; we show images of people and objects in our browser client.
The problem is that the text of the base64 string is searchable, even though indexed="false" is set in schema.xml.
I found this by typing for a Automotive Vehicle Make short hand (VW for Volkswagon), and I got two hits. It is NOT returning any hit highlighting information, but returns a few matching records.
I went further to search for '4AAQSkZJRgABAQEAYABgAAD' and got over 150 hits, again, all matching a string within the ImageThumbnail column.
What am I missing? If Indexed="false", how can Solr search and find matches on that field? What else shuts off searching on a field if not Indexed="false"?
I am doing a /select for querying, and for reference, here is my /select requestHandler:
<requestHandler name="/select" class="solr.SearchHandler">
<lst name="defaults">
<str name="echoParams">explicit</str>
<int name="rows">250</int>
<str name="wt">json</str>
<str name="hl">true</str>
<str name="hl.fl">*</str>
<str name="indent">true</str>
<str name="df">text</str>
</lst>
Thanks for any thoughts/suggestions; VW (when dealing with vehicles) will be a common search term and I need to exclude image strings for matching.
Upvotes: 1
Views: 251
Reputation: 52832
Well, the tokens are present in the string you're searching. You might not be searching against the ImageThumbnail
field (your /select output seems to indicate that you're querying the text
field). This indicates that the content is present in the text
field, probably because you have a copyField
directive that adds the same content to that field as you add to your ImageThumbnail
field.
Find any copyField directives in your schema to see if your content goes to fields you didn't think about (wildcards might affect this). Also confirm that you're not adding the same content to the text field (or if you're querying another field, that field) when indexing (which is a less likely situation).
Upvotes: 1