Distinct values versus schema change?

2010-08-25 Thread Willie Whitehead
Hi,

I'm having a problem where a Solr query on all items in one category
is returning duplicated items when an item appears in more than one
subcategory. My schema involves a document for each item's subcategory
instance. I know this is not correct.

I'm not sure if I ever tried multiple values on subcategories. (Before
the latest changes to the schema, I was only getting the first
subcategory instance and I had a problem with parentcgyid.) Could you
review the 3 results from 1 item below and advise how I can return
only Distinct values for the itmid field?

I think it's best that I change the schema to support multiple values.
I'm currently already using faceting for the subcategories. Do I have
to use it for this purpose also, or should I move forward to improve
my schema configuration?


14440
Girl Costume
GIRLCOSTUME
14440-GIRLCOSTUME
Girl Costume Girl Child
9.99
1400
Girls Costumes
8.99
girl-costume-for-child-GIRLCOSTUME
girls+costumes
occupational
-

L
M
S

In Stock
Occupational|14440

-

14150
Girl Costume
GIRLCOSTUME
14150-GIRLCOSTUME
Girl Costume Girl Child
9.99
1400
Girls Costumes
8.99
girl-costume-for-child-GIRLCOSTUME
girls+costumes
classic
-

L
M
S

In Stock
Classic|14150

-

14010
Girl Costume
GIRLCOSTUME
14010-GIRLCOSTUME
Girl Costume Girl Child
9.99
1400
Girls Costumes
8.99
girl-costume-for-child-GIRLCOSTUME
girls+costumes
50s+costumes
-

L
M
S

In Stock
50's Costumes|14010



Thanks!


Re: Correct way to use tokenizer for whitespace

2010-03-22 Thread Willie Whitehead
Thank you. I tried that but it did not work to remove trailing spaces.
I believe this is why my size facet queries are not working. After
reloading, the XML result entries still have:


LARGE 
MEDIUM
SMALL 


I am using this:






And here is my size field:




I did not know what difference this does:


vs this:



But it appears I do not need that part.





On Mon, Mar 22, 2010 at 2:12 PM, Ahmet Arslan  wrote:
>
>> In my schema.xml, I am trying to remove whitespace from a
>> multivalued
>> field as they come from the database. Is this the correct
>> way:
>>
>>    > class="solr.TextField">
>>       
>>         > class="solr.StandardTokenizerFactory"/>
>>         > class="solr.TrimFilterFactory" />
>>       
>>     
>>
>> I do not believe this is working.
>
> TrimFilterFactory trims leading and trailing white-spaces. But 
> StandardTokenizerFactory already eats up white-spaces. In other words it is 
> meaningless to use it with StandardTokenizerFactory.
>
> In your field type definition you specified only query analyzer but not index 
> analyzer. You can use this directly:
>
> 
>     
>     
>     
> 
>
> What do you mean by removing whitespace from a multivalued field as they come 
> from the database?
>
>
>
>


Correct way to use tokenizer for whitespace

2010-03-22 Thread Willie Whitehead
Hi,

In my schema.xml, I am trying to remove whitespace from a multivalued
field as they come from the database. Is this the correct way:

   
  


  


I do not believe this is working.

Thanks!