[ 
https://issues.apache.org/jira/browse/SOLR-8795?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15184511#comment-15184511
 ] 

Deepak edited comment on SOLR-8795 at 3/8/16 6:37 AM:
------------------------------------------------------

Hey thanks ,

I used your command "bin/solr start -e techproducts" It can replace my core 
"testconfig" to "techproducts" 
following link work for me...
http://192.168.200.23:8983/solr/techproducts/select?q=heart&fl=id,count:termfreq(text,%27heart%27)&wt=json&indent=true

How can I sort this.? I am trying this query 
(http://192.168.200.23:8983/solr/techproducts/select?q=heart&fl=id,score,count:termfreq%28text,%27heart%27%29&wt=json&indent=true&sort=score%20DESC)
 but no luck. :( 

I need to use only relevance sort.

result is ::
{
  "responseHeader":{
    "status":0,
    "QTime":0,
    "params":{
      "q":"heart",
      "indent":"true",
      "fl":"id,score,count:termfreq(text,'heart')",
      "sort":"score DESC",
      "wt":"json"}},
  "response":{"numFound":281,"start":0,"maxScore":0.6010918,"docs":[
      {
        
"id":"/var/www/html/solr/solr-5.4.1/docs/9788131236208_flipick/OPS/page0084.xhtml",
        "score":0.6010918,
        "count":11},
      {
        
"id":"/var/www/html/solr/solr-5.4.1/docs/9788131236208_flipick/OPS/page0087.xhtml",
        "score":0.5993817,
        "count":7},
      {
        
"id":"/var/www/html/solr/solr-5.4.1/docs/9788131236253_flipick/OPS/page0028.xhtml",
        "score":0.50657004,
        "count":5},
      {
        
"id":"/var/www/html/solr/solr-5.4.1/docs/9788131236208_flipick/OPS/page0083.xhtml",
        "score":0.47950536,
        "count":7},
      {
        
"id":"/var/www/html/solr/solr-5.4.1/docs/9788131236208_flipick/OPS/page0088.xhtml",
        "score":0.46703446,
        "count":17},
      {
        
"id":"/var/www/html/solr/solr-5.4.1/docs/9788131236208_flipick/OPS/page0085.xhtml",
        "score":0.45309,
        "count":4},
      {
        
"id":"/var/www/html/solr/solr-5.4.1/docs/9788131236253_flipick/OPS/page0028p.xhtml",
        "score":0.40778098,
        "count":9},
      {
        
"id":"/var/www/html/solr/solr-5.4.1/docs/9788131236284_flipick/OPS/page0018a.xhtml",
        "score":0.40525603,
        "count":5},
      {
        
"id":"/var/www/html/solr/solr-5.4.1/docs/9788131236253_flipick/OPS/page0028t.xhtml",
        "score":0.3949947,
        "count":19},
      {
        
"id":"/var/www/html/solr/solr-5.4.1/docs/9788131236253_flipick/OPS/page0028q.xhtml",
        "score":0.3844596,
        "count":2}]
  }}



was (Author: deepak.ghayal):
Hey thanks ,

I used your command "bin/solr start -e techproducts" It can replace my core 
"testconfig" to "techproducts" 
following link work for me...
http://192.168.200.23:8983/solr/techproducts/select?q=heart&fl=id,count:termfreq(text,%27heart%27)&wt=json&indent=true

How can I sort this.


> build search query
> ------------------
>
>                 Key: SOLR-8795
>                 URL: https://issues.apache.org/jira/browse/SOLR-8795
>             Project: Solr
>          Issue Type: Test
>          Components: clients - php
>         Environment: php
>            Reporter: Deepak
>            Priority: Critical
>              Labels: newbie
>             Fix For: 5.4.1
>
>
> I am new to solr. I installed solr on ubuntu and indexed some unstructured 
> .xhtml documents and trying to use keyword search. it works but I need to no. 
> of occurrence in each document for which is used "termfreq(text,'pharmacy 
> related')" function. but it can't work. I did't change anything in solr core 
> functionality. do i need schema or solrconfig XMLS.
> Here is the url:
> http://192.168.200.23:8983/solr/testconfig/select?q=neuroanatomy&fl=id,count:termfreq(text,'neuroanatomy')
> Please let me know If I wrong or need to change in core.
> thanks in advance
>   



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to