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:

 
 

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

http://localhost:8983/solr/mycore/select?q=pizza&fl=id&tv=true&df=foods&tv.tf_idf=true&tv.tf=true&tv.df=true&tv.fl=foods&omitHeader=true&defType=dismax

this is my results:




1



id

1


5
3
1.6667


2
3
0.


2
1
2.0





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:




1


3




2   *I want that it returns 3 
for the first
document and 1 for the second document and not 2*




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"+"tomato"&fl=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.


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.


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-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:


 
 all
 0.01
 *:*
 0
 regex 



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: 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=pizza&fl=*,score&qf=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: 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:


  
  

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: 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.