Return all Facets?

2010-03-18 Thread homerlex

I'm starting to play with Solr.  I am looking at the API and see that there
is an addFacetField on the SolrQuery Object that is required to specify
which facet fields you want returned.  Is there any way to specify that we
want all facet fields with explicitly having to add them all via
addFacetField?
-- 
View this message in context: 
http://old.nabble.com/Return-all-Facets--tp27944999p27944999.html
Sent from the Solr - User mailing list archive at Nabble.com.



Re: Return all Facets?

2010-03-18 Thread homerlex

Thanks for the reply.  Can someone point me to a sample on how to use the
luke request handler to get this info?


Erik Hatcher-4 wrote:
> 
> No, there isn't.  How would one know what all the facet fields are,  
> though?
> 
> One trick, use the luke request handler to get the list of fields,  
> then use that list to construct the facet fields request parameters.
> 
>   Erik
> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Return-all-Facets--tp27944999p27950714.html
Sent from the Solr - User mailing list archive at Nabble.com.



Re: Return all Facets?

2010-03-19 Thread homerlex

Its still not clear to me how to use the LukeRequestHandler (from the API) to
get a list of all existing facet fields.

Is there an example somewhere?

Thanks for the help!

-- 
View this message in context: 
http://old.nabble.com/Return-all-Facets--tp27944999p27950957.html
Sent from the Solr - User mailing list archive at Nabble.com.



Multi Select Facets through Java API

2010-03-19 Thread homerlex

I have a facet field called Cars.  I want the user to be able to select
multiple values (Camaro, Corvette, etc) and the results should include all
records with Cars = Camaro OR Cars = Corvette.

Are there samples somewhere on how to do this with the Java API?  Does
anything special need to be set in the schema to allow this or it is all via
the query settings?

I know it has something to do with the Tagging and Excluding filters that is
talked about here
http://wiki.apache.org/solr/SimpleFacetParameters#Tagging_and_excluding_Filters
but not sure where to go in the Java API for this.  Is it via the
addFilterQuery method?
-- 
View this message in context: 
http://old.nabble.com/Multi-Select-Facets-through-Java-API-tp27951014p27951014.html
Sent from the Solr - User mailing list archive at Nabble.com.



Re: Multi Select Facets through Java API

2010-03-22 Thread homerlex

bump - anyone?
-- 
View this message in context: 
http://old.nabble.com/Multi-Select-Facets-through-Java-API-tp27951014p27986301.html
Sent from the Solr - User mailing list archive at Nabble.com.



Re: Multi Select Facets through Java API

2010-03-22 Thread homerlex

With your eaxmple I got it working nicely with addFacetField and
addFilterQuery in the API.

Thanks, I appreciate the help.




Britske wrote:
> 
> something like this?
> 
> q=mainquery&fq={!tag=carfq}cars:corvette OR
> cars:camaro&facet=on&facet.field={!ex=carfq key=carfacet}cars
> 
> -the facet: "carfacet" is indepedennt of the filter query that filters on
> cars.
> -you construct the filter query (fq={!tag=carfq}cars:corvette OR
> cars:camaro) yourself in your application layer.
> 
> perhaps a disadvantage is that you get a lot of different filter queries
> which are all independently cached... I don't see any other way at the
> moment though..
> 
> Geert-Jan
> 
> 
> 
> 2010/3/22 homerlex 
> 
>>
>> bump - anyone?
>> --
>> View this message in context:
>> http://old.nabble.com/Multi-Select-Facets-through-Java-API-tp27951014p27986301.html
>> Sent from the Solr - User mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Multi-Select-Facets-through-Java-API-tp27951014p27989508.html
Sent from the Solr - User mailing list archive at Nabble.com.



Highlighting - Turn of Escaping of HTML?

2010-05-05 Thread homerlex

In the solrconfig, is there any way to have a "fragmenter" that doesn't
escape html in the text?  We are going to render the full text of the field
and want to render the text as is (with html in tact). 
-- 
View this message in context: 
http://lucene.472066.n3.nabble.com/Highlighting-Turn-of-Escaping-of-HTML-tp779164p779164.html
Sent from the Solr - User mailing list archive at Nabble.com.


Highlighting Issue

2010-06-03 Thread homerlex

We have Highlighting enabled.  We specify that we only want highlighting on
the "body" property.

When doing a query like this: (body:tester OR project_id:704) the text
highlighted in the body includes any text that is "tester" and any text that
is "704".

Is there a way to prevent the highlighting from marking up values that are
in the query that have nothing to do with actually matching on the body?

Thanks in advance.
-- 
View this message in context: 
http://lucene.472066.n3.nabble.com/Highlighting-Issue-tp867567p867567.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Highlighting Issue

2010-06-03 Thread homerlex


iorixxx wrote:
> 
> hl.requireFieldMatch=true
> 
> http://wiki.apache.org/solr/HighlightingParameters#hl.requireFieldMatch
> 
> 

I had tried this before but it did not work because in the query I did not
specify body:.  This does work fine if I put body:terms in the query.

Is there an simpler syntax to say search for terms in the following
properties X,Y, and Z only or do I have to do this:
x:terms OR y:terms OR z.terms

Thanks for the help.

-- 
View this message in context: 
http://lucene.472066.n3.nabble.com/Highlighting-Issue-tp867567p867876.html
Sent from the Solr - User mailing list archive at Nabble.com.


MultiValue Exclusion

2010-06-04 Thread homerlex

How would you model this?

We have a table of news items that people can view in their news stream and
comment on.  Users have the ability to "mute" item so they never see them in
their feed or search results.

>From what I can see there are a couple ways to accomplish this.

1 - Post process the results and do not render any muted news items.  The
downside of the pagination become problematic.  Its possible we may forgo
pagination because of this but for now assume that pagination is a
requirement.

2 - Whenever we query for a given user we append a clause that excludes all
muted items.  I assume in Solr we'd need to do something like -item_id(1 AND
2 AND 3).  Obviously this doesn't scale very well.

3 - Have a multi-valued property in the index that contains all ids of users
who have muted the item.  Being new to Solr I don't even know how (or if its
possible) to run a query that says "user id not this multivalued property". 
Can this even be done (sample query please)?  Again, I know this doesn't
scale very well.

Any other suggestions?

Thanks in advance for the help.
-- 
View this message in context: 
http://lucene.472066.n3.nabble.com/MultiValue-Exclusion-tp870173p870173.html
Sent from the Solr - User mailing list archive at Nabble.com.