if you want to have exactly the same effect as the SQL equality, you need more.
The phrase query matches anything with words Social followed by news.
It would also match feedClass:"... finished. Social News In Our Bulletin". As noted elsewhere on the thread you need to query this on a field thats' analyzed "little".

Having a "verbatim analyzer" could be the trick (is it good?).
Having an analyzer that puts start and end marks would also be the trick.

paul

Le 04-nov.-09 à 18:15, Jérôme Etévé a écrit :
you need to quote your phrase when you search for 'Social News':

feedClass:"Social News" (URI encoded of course).

otherwise your request will become (I assume you're using a standard
query parser) feedClass:Social defaultField:News . Well that's the
idea.

It should then work using the type string.

Cheers!

J.


2009/11/4 Joel Nylund <jnyl...@yahoo.com>:
Hi,

I have a field that I want to do exact match lookups using.
(when I say exact match, im looking for equivalent to a sql query where with
no like clause so where feedClass = "Social News")

For example the field is called feedClass and im doing:

http://localhost:8983/solr/select?q=feedClass:Blog

http://localhost:8983/solr/select?q=feedClass:Social%20News

I tried using "text" and it seems to work pretty well except for classes
with spaces in them.

So I tried using field type string, that didnt work. Then I tried defining a
new type called:

   <fieldType name="text_nows" class="solr.TextField"
positionIncrementGap="100">
  </fieldType>


This didnt seem to help either.

When I do these queries for this field with spaces, I seem to get random
results

For example:

<response>
−
<lst name="responseHeader">
<int name="status">0</int>
<int name="QTime">5</int>
−
<lst name="params">
<str name="q">feedClass:Social News</str>
</lst>
</lst>
−
<result name="response" numFound="3451" start="0">
−
<doc>
<str name="feedClass">Blog</str>
<str name="firstLetterTitle">N</str>
</doc>


any ideas?

thanks
Joel





--
Jerome Eteve.
http://www.eteve.net
jer...@eteve.net

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to