Re: Change the score of a document based on the *value* of a multifield using dismax

2013-09-04 Thread danielitos85
Thanks a lot David. 
I will try it ;)





--
View this message in context: 
http://lucene.472066.n3.nabble.com/Change-the-score-of-a-document-based-on-the-value-of-a-multifield-tp4087503p4088145.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Change the score of a document based on the *value* of a multifield using dismax

2013-08-31 Thread danielitos85
Thanks Erick, but think if I have an simple float value and not distance.

I have a situation like this:

- id: 1
- myText:  [iphone, ipad, macbook]
- myFieldFloat: [3.4,2.1,5.3]

I want to set the value of myFieldFloat at his respective myText.

I tried this:

entity name=item
query=SELECT myText,
  myFloatValue
FROM myTable
WHERE myCondition 
  
  field name=myText column=myText boost=${item.myFloatValue} /

but it return an error: 
org.apache.solr.handler.dataimport.DataImportHandlerException: Data Config
problem: For input string: {$places.distance_place}
at 

I also tried to set in my query a Cast, but the same error:

SELECT myText,
  CAST(myFloatValue AS DECIMAL(10,6)) as myFloatValue
  FROM myTable
 WHERE myCondition

please, any suggests?



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Change-the-score-of-a-document-based-on-the-value-of-a-multifield-tp4087503p4087663.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Change the score of a document based on the *value* of a multifield using dismax

2013-08-31 Thread danielitos85
:(



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Change-the-score-of-a-document-based-on-the-value-of-a-multifield-tp4087503p4087666.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Solr 4.4 problem with loading DisMaxRequestHandler

2013-08-30 Thread danielitos85
thanks a lot ;)



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Solr-4-4-problem-with-loading-DisMaxRequestHandler-tp4085842p4087449.html
Sent from the Solr - User mailing list archive at Nabble.com.


Change the score of a document based on the *value* of a multifield using dismax

2013-08-30 Thread danielitos85
Hi guys,

I need to change the score of a document based on the value of a multifield.
I thoght that maybe I need to set boost in index-time (but I don't sure).
Now I explain you my situation:

- I'm usng solr4.4 
- I'm index data using dataimporthandler with rdbms
- my documents are a particular kind of places
- my field are places and their review and description
- my multifield is distance_place beacause each place (one place is a field)
has a lot of review or description

I'm tring with the following request but it return error can not use
FieldCache on multivalued field: distance_place

http://localhost:8983/solr/myCore/select?q={!boost b=distance_place v=$qq
defType=dismax}qq=pizzafl=*,scoreqf=text_review+text_description

I'm thinking that if I set the boost at each review/description with the
value of the distance_place in index-time it is easy, but in this case I
don't know which is the right syntax to set the boost into db-dataimport.xml
file.

Please, Any suggests? 
Thanks in advance.




--
View this message in context: 
http://lucene.472066.n3.nabble.com/Change-the-score-of-a-document-based-on-the-value-of-a-multifield-using-dismax-tp4087503.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Change the score of a document based on the *value* of a multifield using dismax

2013-08-30 Thread danielitos85
Ok, agree.
I mean that I want to set a boost to each review/description (multifield) of
the Places (multifield), and this boost is the corrispective value of the
distance beetween the place and the particular kind of place that I have as
document.

Is it clear?

I Try to explain again the situation:

 - my document is a particular kind of Place (for example airport)
 - my fields are all the text (review and description) of the places around
the airport having a distance  10 km.

Now if I search for pizza solr return me the airport where there are a lot
of terms pizza into review/description doesn't consider the distance. So I
want to set a boost at each review/description based on the value of
distance.

Thanks in advance



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Change-the-score-of-a-document-based-on-the-value-of-a-multifield-tp4087503p4087563.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: get term frequency, just only keywords search

2013-08-21 Thread danielitos85
Thanks a lot guys,

@Jack in my search I use dismax (how defType) and I search either term or
phrase, but I need to get the number that show me how many time that term or
phrase is in the document.

I could get it from debugQuery but I would like get it directly from the
results.

What do you suggest? 
Thanks a lot for support.



--
View this message in context: 
http://lucene.472066.n3.nabble.com/get-term-frequency-just-only-keywords-search-tp4084510p4085831.html
Sent from the Solr - User mailing list archive at Nabble.com.


Solr 4.4 problem with loading DisMaxRequestHandler

2013-08-21 Thread danielitos85
Hi guys,

I'm using a clean solr 4.4 installation and I have add in my solrconfig.xml
the following lines:

requestHandler name=dismax class=solr.DisMaxRequestHandler 
 lst name=defaults
 str name=echoParamsall/str
 float name=tie0.01/float
 str name=q.alt*:*/str
 str name=f.name.hl.fragsize0/str
 str name=f.text.hl.fragmenterregex/str 
/lst
/requestHandler

but when I start my solr he return an error:

*Caused by: java.lang.ClassNotFoundException: solr.DisMaxRequestHandler*

In my dist folder I have all the defaults library and also in the lib folder
into my core
please, any suggests?

Thanks in advance.



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Solr-4-4-problem-with-loading-DisMaxRequestHandler-tp4085842.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Error loading class 'solr.DisMaxRequestHandler' after upgrade from solr350 to 431

2013-08-20 Thread danielitos85
how do you solved this problem?



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Error-loading-class-solr-DisMaxRequestHandler-after-upgrade-from-solr350-to-431-tp4083477p4085699.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: get term frequency, just only keywords search

2013-08-19 Thread danielitos85
Thanks Jack,

but if my keyword search are two words? for example french fries ? how is
the right syntax?



--
View this message in context: 
http://lucene.472066.n3.nabble.com/get-term-frequency-just-only-keywords-search-tp4084510p4085399.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: get term frequency, just only keywords search

2013-08-19 Thread danielitos85
 there isn't a way to get termFreq about a search like french fries
(sentence)?



--
View this message in context: 
http://lucene.472066.n3.nabble.com/get-term-frequency-just-only-keywords-search-tp4084510p4085454.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: get term frequency, just only keywords search

2013-08-19 Thread danielitos85
ok I undestand it (thanks) but if I search a sentence and type
debugQuery=on, in the explain I obtain termFreq=2.0 and it right. 

Is it possible to obtain that parameter? 



--
View this message in context: 
http://lucene.472066.n3.nabble.com/get-term-frequency-just-only-keywords-search-tp4084510p4085464.html
Sent from the Solr - User mailing list archive at Nabble.com.


get term frequency, just only keywords search

2013-08-14 Thread danielitos85
I need to get the TermFrequency in Solr4 but just about my keywords search
and not for all the keywords that a field cointains.

I try to explain with an example:

I have this fiels:

field name=idtype=string indexed=true   
stored=truerequired=true / 
field name=foods type=text   indexed=true   
stored=truerequired=truetermVectors=true 
termPositions=truetermOffsets=true/ 

when I try to searh into field foods the keyword pizza like this:

http://localhost:8983/solr/mycore/select?q=pizzafl=idtv=truedf=foodstv.tf_idf=truetv.tf=truetv.df=truetv.fl=foodsomitHeader=truedefType=dismax

this is my results:

response
result name=response numFound=1 start=0
doc
str name=id1/str
/doc
/result
lst name=termVectors
str name=uniqueKeyFieldNameid/str
lst name=1
str name=uniqueKey1/str
lst name=foods
lst name=pizza
int name=tf5/int
int name=df3/int
double name=tf-idf1.6667/double
/lst
lst name=ice-cream
int name=tf2/int
int name=df3/int
double name=tf-idf0./double
/lst
lst name=tomato
int name=tf2/int
int name=df1/int
double name=tf-idf2.0/double
/lst
/lst
/lst
/lst

Now, my question is: why I get the tf for all the indexed keywords into
field foods and not only for my keyword search (pizza)?

Please, have you any suggests? Thanks in advance




--
View this message in context: 
http://lucene.472066.n3.nabble.com/get-term-frequency-just-only-keywords-search-tp4084510.html
Sent from the Solr - User mailing list archive at Nabble.com.


RE: get term frequency, just only keywords search

2013-08-14 Thread danielitos85
Thanks for your answer, but I'm tring to use TermsComponent but the output is
similar.
TermsComponent returns all the terms (*and not just for the term that I have
search*) and their counts for a given field.

something wrong?




--
View this message in context: 
http://lucene.472066.n3.nabble.com/get-term-frequency-just-only-keywords-search-tp4084510p4084518.html
Sent from the Solr - User mailing list archive at Nabble.com.


RE: get term frequency, just only keywords search

2013-08-14 Thread danielitos85
thanks a lot Markus ;)
If I use regex parameter it works 



--
View this message in context: 
http://lucene.472066.n3.nabble.com/get-term-frequency-just-only-keywords-search-tp4084510p4084525.html
Sent from the Solr - User mailing list archive at Nabble.com.


RE: get term frequency, just only keywords search

2013-08-14 Thread danielitos85
sorry, but now I give more attention at the results and it don't return that
I needed.

If I have two documents indexed:

the text of my first document: ice-cream pizza pizza pizza
the text of my second document: pizza tomato

it returns the followed code:

response
result name=response numFound=2 start=0
doc
str name=id1/str
/doc
doc
str name=id3/str
/doc
/result
lst name=terms
lst name=mytext
int name=pizza2/int   *I want that it returns 3 
for the first
document and 1 for the second document and not 2*
/lst
/lst
/response

Thanks a lot



--
View this message in context: 
http://lucene.472066.n3.nabble.com/SOLVED-get-term-frequency-just-only-keywords-search-tp4084510p4084530.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: get term frequency, just only keywords search

2013-08-14 Thread danielitos85
Thanks Jack,

I'm tring to use tf function but I don't understand: why he returns a float
value and not integer?

At the start of this topic I explained an example where I used term
Frequency but it don't works how I need because he returns the term
frequency about all the terms of my field.

Thanks in advance.



--
View this message in context: 
http://lucene.472066.n3.nabble.com/get-term-frequency-just-only-keywords-search-tp4084510p4084629.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: get term frequency, just only keywords search

2013-08-14 Thread danielitos85
Thanks.
I tried to use termfreq function and it is ok for me but, last my question
is: if I have a query like this:

q=pizza+tomatofl=id,termfreq(myfield,**)

how set my query (pizza+tomato) in second param in termfreq function? 



--
View this message in context: 
http://lucene.472066.n3.nabble.com/get-term-frequency-just-only-keywords-search-tp4084510p4084643.html
Sent from the Solr - User mailing list archive at Nabble.com.