Re: Solr does not recognize language

2014-05-05 Thread Frankcis
i think you should check your scheme.xml and solrconfig.xml encoding format =
utf-8。



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Solr-does-not-recognize-language-tp4133711p4134643.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Solr does not recognize language

2014-05-05 Thread Frankcis
because if your encoding format doesn't both utf-8, building index will lead
to messy code, of course, you will not get the expected result.



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Solr-does-not-recognize-language-tp4133711p4134647.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: sort groups by the sum of the scores of the documents within each group

2014-05-05 Thread Frankcis
my scheme.xml:

  
   
   
   
   
   









  
  
  

  
  
  
  
 
  
 
 
 id

 
 name

 
 


update docs:
"docs": [
  {
"name": "苹果4s",
"type": "手机",
"price": 2000,
"id": "4017e35a-6b19-45b6-b945-382340ca1eec",
"_version_": 1466799722505175000
  },
  {
"name": "苹果5",
"type": "手机",
"price": 5000,
"id": "4052d9f3-f6d9-458f-8bb0-477b17852f37",
"_version_": 1466799735745544200
  },
  {
"name": "三星",
"type": "手机",
"price": 3000,
"id": "468abce8-8bb9-4f51-9900-8d4d6abc02ac",
"_version_": 1466799747596550100
  },
  {
"name": "摩托罗拉i3",
"type": "电脑",
"price": 1000,
"id": "db66bb02-3d6a-4ab0-9133-2e6e38b3d4dd",
"_version_": 1466799757491961900
  },
  {
"name": "摩托罗拉i5",
"type": "电脑",
"price": 1500,
"id": "f211525f-bc3c-4ea7-aded-1c46a94ecd1c",
"_version_": 1466799766311534600
  }
]
thank you , Erick,
i want to sort groups based on the sum of documents' scores within each
group, as you said, solr excels at getting the score of single documents, in
solr 4.6, the default sort of group each other depends on the maxScore of
all documents within each group, but the sum of documents' scores, though i
can get the sum of documents' scores by the client program, it's not good
idea, l know that the stats component of solr can statistics the long field,
so I had the idea to use statistic data for score field, but the score is
pse-udo field, the stats.field doesn't support it. In addition, as
scheme.xml displayed,  i do group on the elements of a string field(type)
without using participle.



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Re-sort-groups-by-the-sum-of-the-scores-of-the-documents-within-each-group-tp4134715p4134830.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Solr does not recognize language

2014-05-05 Thread Frankcis
hi,iorixxx, i'm Frankcis, not Victor , are you make the wrong email?


2014-05-05 23:20 GMT+08:00 iorixxx [via Lucene] <
ml-node+s472066n4134713...@n3.nabble.com>:

> Hi Victor,
>
> I don't know mysolr, I assume you are using /update/json, lets add your
> chain to defaults section.
>
>   
>
> 
>  application/json
>  langid
>
>   
>
>
>
>
> On Monday, May 5, 2014 4:06 PM, Victor Pascual <[hidden 
> email]<http://user/SendEmail.jtp?type=node&node=4134713&i=0>>
> wrote:
> Hi there,
>
> I'm indexing my documents using mysolr. I mainly generate a lost of json
> objects and the run: solr.update(documents_array,'json')
>
>
>
> On Mon, May 5, 2014 at 1:08 PM, Ahmet Arslan <[hidden 
> email]<http://user/SendEmail.jtp?type=node&node=4134713&i=1>>
> wrote:
>
> > Hi Victor,
> >
> > How do you index your documents? Your last config looks correct. However
> > for example if you use data import handler you need to add update.chain
> > there too. Same as extraction request hadler if you are using sole-cell.
> >
> >  > class="org.apache.solr.handler.dataimport.DataImportHandler">
> > 
> >   /home/username/data-config.xml
> >   langid
> > 
> >   
> >
> > By the way The URL
> > http://localhost:8080/solr/update?commit=true&update.chain=langid was
> > just an example and meant to feed xml update messages by POST method.
> Not
> > to use in a browser.
> >
> > Ahmet
> >
> > On Monday, May 5, 2014 11:04 AM, Victor Pascual <
> > [hidden email] <http://user/SendEmail.jtp?type=node&node=4134713&i=2>>
> wrote:
> >
> > Thank you very much for you help Ahmet.
> >
> > However the language detection is still not workin. :(
> > My solrconfig.xml didn't contain that lst section inside the update
> > requestHandler.
> > That's the content I added:
> >
> >> >  class="solr.XmlUpdateRequestHandler">
> > >   
> > > langid
> > >   
> > >
> > >
> >
> >
> > >>
> class="org.apache.solr.update.processor.LangDetectLanguageIdentifierUpdateProcessorFactory">
>
> > >  
> > >text
> > >lang
> > >  
> > >
> > >
> > >   
> > > 
> >
> > Now, your suggested query
> > http://localhost:8080/solr/update?commit=true&update.chain=langid returns
>
> >
> > 
> > >
> > >0
> > >14
> > >
> > >
> > And there is still no lang field in my documents.
> > Any idea what am I doing wrong?
> >
> >
> >
> >
> > On Tue, Apr 29, 2014 at 5:33 PM, Ahmet Arslan <[hidden 
> > email]<http://user/SendEmail.jtp?type=node&node=4134713&i=3>>
> wrote:
> >
> > Hi,
> > >
> > >solr/update should be used, not /solr/select
> > >
> > >curl '
> http://localhost:8983/solr/update?commit=true&update.chain=langid'
> > >
> > >By the way don't you have following definition in your solrconfig.xml?
> > >
> > > 
> > >
> > >   
> > > langid
> > >   
> > >  
> > >
> > >
> > >
> > >
> > >On Tuesday, April 29, 2014 4:50 PM, Victor Pascual <
> > [hidden email] <http://user/SendEmail.jtp?type=node&node=4134713&i=4>>
> wrote:
> > >Hi Ahmet,
> > >
> > >thanks for your reply. Adding &update.chain=langid to my query doesn't
> > >work: IP:8080/solr/select/?q=*%3A*&update.chain=langid
> > >Regarding defining the chain in an UpdateRequestHandler... sorry for
> the
> > >lame question but shall I paste those three lines to solrconfig.xml, or
> > >shall I add them somewhere else?
> > >
> > >There is not UpdateRequestHandler in my solrconfig.
> > >
> > >Thanks!
> > >
> > >
> > >
> > >On Tue, Apr 29, 2014 at 3:13 PM, Ahmet Arslan <[hidden 
> > >email]<http://user/SendEmail.jtp?type=node&node=4134713&i=5>>
> wrote:
> > >
> > >> Hi,
> > >>
> > >> Did you attach your chain to a UpdateRequestHandler?
> > >>
> > >> You can do it by adding &update.chain=la

Re: sort groups by the sum of the scores of the documents within each group

2014-05-05 Thread Frankcis
thank you, Erick, you're right, the maxScore of document within each group is
more effective than the sum of scores in a group, especially some use-case
just as your assumption(group 1 could have 10M documents all with a score of
.01 and group 2 could have 1 document with a score of 1,000 and group 1
would sort 
first) ,but the function is required by the client, can you tell me the way
how to achieve it ?



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Re-sort-groups-by-the-sum-of-the-scores-of-the-documents-within-each-group-tp4134715p4134856.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: sort groups by the sum of the scores of the documents within each group

2014-05-05 Thread Frankcis
thank you, Erick, you're good man,
this is the client requirement:
In the forum, there is a lot of discussion of the content under different
subjects, search for a keyword,
which will lead to a result that the word of content or subject match the
query, group these document based on every subject, sort these groups based
on the sum score of every subject.

my pleasure to listen your suggestions.





--
View this message in context: 
http://lucene.472066.n3.nabble.com/Re-sort-groups-by-the-sum-of-the-scores-of-the-documents-within-each-group-tp4134715p4134869.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Solr does not recognize language

2014-05-06 Thread Frankcis
my pleasure!


2014-05-06 16:43 GMT+08:00 Victor Pascual [via Lucene] <
ml-node+s472066n413488...@n3.nabble.com>:

> Thank you very much Ahmet for your help.
> It finally worked!
>
> For anyone interested, all your hints where more than useful. I basically
> had two problems:
> - Didn't have my language detection chain in the update/json
> requestHandler
> - Didn't create the field where the detected language should be stored
>
> Again, thanks for your help!
>
>
> On Mon, May 5, 2014 at 5:19 PM, Ahmet Arslan <[hidden 
> email]>
> wrote:
>
> > Hi Victor,
> >
> > I don't know mysolr, I assume you are using /update/json, lets add your
> > chain to defaults section.
> >
> >   
> >
> > 
> >  application/json
> >  langid
> >
> >   
> >
> >
> >
> >
> > On Monday, May 5, 2014 4:06 PM, Victor Pascual <
> > [hidden email] >
> wrote:
> > Hi there,
> >
> > I'm indexing my documents using mysolr. I mainly generate a lost of json
> > objects and the run: solr.update(documents_array,'json')
> >
> >
> >
> > On Mon, May 5, 2014 at 1:08 PM, Ahmet Arslan <[hidden 
> > email]>
> wrote:
> >
> > > Hi Victor,
> > >
> > > How do you index your documents? Your last config looks correct.
> However
> > > for example if you use data import handler you need to add
> update.chain
> > > there too. Same as extraction request hadler if you are using
> sole-cell.
> > >
> > >  > > class="org.apache.solr.handler.dataimport.DataImportHandler">
> > > 
> > >   /home/username/data-config.xml
> > >   langid
> > > 
> > >   
> > >
> > > By the way The URL
> > > http://localhost:8080/solr/update?commit=true&update.chain=langid was
> > > just an example and meant to feed xml update messages by POST method.
> Not
> > > to use in a browser.
> > >
> > > Ahmet
> > >
> > > On Monday, May 5, 2014 11:04 AM, Victor Pascual <
> > > [hidden email] >
> wrote:
> > >
> > > Thank you very much for you help Ahmet.
> > >
> > > However the language detection is still not workin. :(
> > > My solrconfig.xml didn't contain that lst section inside the update
> > > requestHandler.
> > > That's the content I added:
> > >
> > >> > >  class="solr.XmlUpdateRequestHandler">
> > > >   
> > > > langid
> > > >   
> > > >
> > > >
> > >
> > >
> > > >> >
> >
> class="org.apache.solr.update.processor.LangDetectLanguageIdentifierUpdateProcessorFactory">
>
> > > >  
> > > >text
> > > >lang
> > > >  
> > > >
> > > >
> > > >   
> > > > 
> > >
> > > Now, your suggested query
> > >
> http://localhost:8080/solr/update?commit=true&update.chain=langidreturns
> > >
> > > 
> > > >
> > > >0
> > > >14
> > > >
> > > >
> > > And there is still no lang field in my documents.
> > > Any idea what am I doing wrong?
> > >
> > >
> > >
> > >
> > > On Tue, Apr 29, 2014 at 5:33 PM, Ahmet Arslan <[hidden 
> > > email]>
> wrote:
> > >
> > > Hi,
> > > >
> > > >solr/update should be used, not /solr/select
> > > >
> > > >curl '
> http://localhost:8983/solr/update?commit=true&update.chain=langid
> > '
> > > >
> > > >By the way don't you have following definition in your
> solrconfig.xml?
> > > >
> > > > 
> > > >
> > > >   
> > > > langid
> > > >   
> > > >  
> > > >
> > > >
> > > >
> > > >
> > > >On Tuesday, April 29, 2014 4:50 PM, Victor Pascual <
> > > [hidden email] >
> wrote:
> > > >Hi Ahmet,
> > > >
> > > >thanks for your reply. Adding &update.chain=langid to my query
> doesn't
> > > >work: IP:8080/solr/select/?q=*%3A*&update.chain=langid
> > > >Regarding defining the chain in an UpdateRequestHandler... sorry for
> the
> > > >lame question but shall I paste those three lines to solrconfig.xml,
> or
> > > >shall I add them somewhere else?
> > > >
> > > >There is not UpdateRequestHandler in my solrconfig.
> > > >
> > > >Thanks!
> > > >
> > > >
> > > >
> > > >On Tue, Apr 29, 2014 at 3:13 PM, Ahmet Arslan <[hidden 
> > > >email]>
>
> > wrote:
> > > >
> > > >> Hi,
> > > >>
> > > >> Did you attach your chain to a UpdateRequestHandler?
> > > >>
> > > >> You can do it by adding &update.chain=langid to the URL or defining
> it
> > > in
> > > >> a defaults section as follows
> > > >>
> > > >> 
> > > >>  langid
> > > >>
> > > >>
> > > >>
> > > >>
> > > >> On Tuesday, April 29, 2014 3:18 PM, Victor Pascual <
> > > >> [hidden email]>
> wrote:
> > > >> Dear all,
> > > >>
> > > >> I'm a new user of Solr. I've managed to index a bunch of documents
> (in
> > > >> fact, they are tweets) and everything works quite smoo

Re: sort groups by the sum of the scores of the documents within each group

2014-05-10 Thread Frankcis
hei, Erick, Sorry to bother you again, i send the client requirement to you
in the solr mail list, but i can't get your reply, i want your advice.


2014-05-06 13:24 GMT+08:00 Frankcis [via Lucene] <
ml-node+s472066n413486...@n3.nabble.com>:

> thank you, Erick, you're good man,
> this is the client requirement:
> In the forum, there is a lot of discussion of the content under different
> subjects, search for a keyword,
> which will lead to a result that the word of content or subject match the
> query, group these document based on every subject, sort these groups based
> on the sum score of every subject.
>
> my pleasure to listen your suggestions.
>
>
>
> --
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://lucene.472066.n3.nabble.com/Re-sort-groups-by-the-sum-of-the-scores-of-the-documents-within-each-group-tp4134715p4134869.html
>  To unsubscribe from Re: sort groups by the sum of the scores of the
> documents within each group, click 
> here<http://lucene.472066.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4134715&code=ZmluYWx4Y29kZUBnbWFpbC5jb218NDEzNDcxNXwyMDg1ODE1Mzg4>
> .
> NAML<http://lucene.472066.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>




--
View this message in context: 
http://lucene.472066.n3.nabble.com/Re-sort-groups-by-the-sum-of-the-scores-of-the-documents-within-each-group-tp4134715p4135044.html
Sent from the Solr - User mailing list archive at Nabble.com.