score mixing

2016-03-27 Thread michael solomon
Hi,
I have nested documents and use in BlockJoinQueryParser.
In parent documents I have "rank" field that give an arbitrary score for
each parent.
It's possible to mix the original scoring with mine? i.e:
SolrScore+rank=finel score
or(proportional scoring..)SolrScore/MaxScore + rank/MaxRank = finel
score(between 0-1)
Thanks,
Michael


Solr to Production

2016-03-27 Thread Adel Mohamed Khalifa
Hello All,

 

I installed solr server on my Ubuntu and  when I use it directly it  runs
good, but when I use it remotely using my website it doesnot run and I don't
know what the reason, can you  help me please.

 

Regards,
Adel Khalifa 

 



Re: Solr to Production

2016-03-27 Thread Reth RM
Is that website deployed on same machine where solr is running? If not,
check whether the port is being blocked due to firewall protection.  What
is the response message that you are receiving?



On Sun, Mar 27, 2016 at 3:16 PM, Adel Mohamed Khalifa <
a.moha...@saudisoft.com> wrote:

> Hello All,
>
>
>
> I installed solr server on my Ubuntu and  when I use it directly it  runs
> good, but when I use it remotely using my website it doesnot run and I
> don't
> know what the reason, can you  help me please.
>
>
>
> Regards,
> Adel Khalifa
>
>
>
>


Re: score mixing

2016-03-27 Thread Reth RM
If you are looking for boosting the score of the document based on the
value of rank field then you can as well use field boosting.
rank^10. For the other case of adding scores and rank values, using
"function query" should serve the requirement.

https://cwiki.apache.org/confluence/display/solr/The+Extended+DisMax+Query+Parser

On Sun, Mar 27, 2016 at 2:27 PM, michael solomon 
wrote:

> Hi,
> I have nested documents and use in BlockJoinQueryParser.
> In parent documents I have "rank" field that give an arbitrary score for
> each parent.
> It's possible to mix the original scoring with mine? i.e:
> SolrScore+rank=finel score
> or(proportional scoring..)SolrScore/MaxScore + rank/MaxRank = finel
> score(between 0-1)
> Thanks,
> Michael
>


RE: Solr to Production

2016-03-27 Thread Adel Mohamed Khalifa
Hello,

I checked the port and it is not blocked.
When I click the search button there is nothing.

I try to debug my netbeans on Ubuntu and the same problem is existing it cannot 
call the server and stop at this statement :-
-- SolrServer server = new HttpSolrServer(ip:port/solr/core);

Regards,
Adel Khalifa 

-Original Message-
From: Reth RM [mailto:reth.ik...@gmail.com] 
Sent: Sunday, March 27, 2016 12:53 PM
To: solr-user@lucene.apache.org
Subject: Re: Solr to Production

Is that website deployed on same machine where solr is running? If not, check 
whether the port is being blocked due to firewall protection.  What is the 
response message that you are receiving?



On Sun, Mar 27, 2016 at 3:16 PM, Adel Mohamed Khalifa < 
a.moha...@saudisoft.com> wrote:

> Hello All,
>
>
>
> I installed solr server on my Ubuntu and  when I use it directly it  
> runs good, but when I use it remotely using my website it doesnot run 
> and I don't know what the reason, can you  help me please.
>
>
>
> Regards,
> Adel Khalifa
>
>
>
>




Making my own search website

2016-03-27 Thread Adel Mohamed Khalifa
Hello All,

 

First, I want to apology for my complexity needs before and that I cannot
asking obviously.

 

So Now, I create my Solr server and indexing I can log on it directly throw
( http://ip:port/solr/#) from ubuntu server or my windows laptop.

I build my website on netbeans using J2EE on my windows laptop and add a
servlet to access the solr server for searching and when I run it it works
good.

 

But the problem occurred when I try to run on it on the Ubuntu server it
stopped at : -- SolrServer server = new HttpSolrServer(ip:port/solr/core);

And it does not give me any exception.

 

I attached the ajax code that I use to call the servlet and also attached
the servlet code.

 

Regards,
Adel Khalifa | Developer | Saudisoft-Egypt |  Tel: +2 023 303 2037 - ext 112
| M +2 01149247744 | Fax +2 023 303 2036 | Follow us on
 Description: cid:image001.gif@01D11A1D.D81CE0C0 |
 Description:
cid:image002.gif@01D11A1D.D81CE0C0 |
 Description: cid:image003.gif@01D11A1D.D81CE0C0
Description: cid:image004.jpg@01D11A1D.D81CE0C0

 

 

$.ajax({
url: contextPath + '/GetResults',
data: {
qu: $("#query").val()
},
dataType: 'json'
}).done(function (result) {

var items = result;/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package Search;

import MTDAO.Core;
import com.google.gson.Gson;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Iterator;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.solr.client.solrj.SolrServer;
import org.apache.solr.client.solrj.SolrServerException;
import org.apache.solr.client.solrj.impl.HttpSolrServer;
import org.apache.solr.client.solrj.response.QueryResponse;
import org.apache.solr.common.SolrDocument;
import org.apache.solr.common.SolrDocumentList;

import org.apache.solr.common.params.ModifiableSolrParams;
import static org.eclipse.persistence.jpa.rs.util.JPARSLogger.exception;

/**
 *
 * @author iramadan
 */
public class GetResults extends HttpServlet {

/**
 * Processes requests for both HTTP GET and POST
 * methods.
 *
 * @param request servlet request
 * @param response servlet response
 * @throws ServletException if a servlet-specific error occurs
 * @throws IOException if an I/O error occurs
 * @throws org.apache.solr.client.solrj.SolrServerException
 */
protected void processRequest(HttpServletRequest request, 
HttpServletResponse response)
throws ServletException, IOException, SolrServerException {
response.setContentType("text/html;charset=UTF-8");
try (PrintWriter out = response.getWriter()) {
SolrServer server = new 
HttpSolrServer(Core.solrResourceBundle.getString("SOLR_SERVER_URL"));
ModifiableSolrParams params = new ModifiableSolrParams();
String qqq = new 
String(request.getParameter("qu").getBytes("ISO-8859-1"), "UTF-8");
params.set("q", new 
String(request.getParameter("qu").getBytes("ISO-8859-1"), "UTF-8"));
params.set("rows", "3");
params.set("wt", "json");
params.set("indent", "true");

QueryResponse res = server.query(params);
SolrDocumentList results = res.getResults();
Iterator i = results.iterator();
request.setAttribute("size", results.size());
String json = new Gson().toJson(res.getResults());
out.write(json);

} catch (Exception ex) {
PrintWriter oout = response.getWriter();
oout.write(ex.toString());
}
}

// 
/**
 * Handles the HTTP GET method.
 *
 * @param request servlet request
 * @param response servlet response
 * @throws ServletException if a servlet-specific error occurs
 * @throws IOException if an I/O error occurs
 */
@Override
protected void doGet(HttpServletRequest request, HttpServletResponse 
response)
throws ServletException, IOException {
try {
processRequest(request, response);
} catch (SolrServerException ex) {
Logger.getLogger(GetResults.class.getName()).log(Level.SEVERE, 
null, ex);
}
}

/**
 * Handles the HTTP POST method.
 *
 * @param request servlet request
 * @param response serv

Re: Solr to Production

2016-03-27 Thread Erik Hatcher
Now back up and start troubleshooting with curl outside of java, netbesns, etc

> On Mar 27, 2016, at 07:24, Adel Mohamed Khalifa  
> wrote:
> 
> Hello,
> 
> I checked the port and it is not blocked.
> When I click the search button there is nothing.
> 
> I try to debug my netbeans on Ubuntu and the same problem is existing it 
> cannot call the server and stop at this statement :-
> -- SolrServer server = new HttpSolrServer(ip:port/solr/core);
> 
> Regards,
> Adel Khalifa 
> 
> -Original Message-
> From: Reth RM [mailto:reth.ik...@gmail.com] 
> Sent: Sunday, March 27, 2016 12:53 PM
> To: solr-user@lucene.apache.org
> Subject: Re: Solr to Production
> 
> Is that website deployed on same machine where solr is running? If not, check 
> whether the port is being blocked due to firewall protection.  What is the 
> response message that you are receiving?
> 
> 
> 
>> On Sun, Mar 27, 2016 at 3:16 PM, Adel Mohamed Khalifa < 
>> a.moha...@saudisoft.com> wrote:
>> 
>> Hello All,
>> 
>> 
>> 
>> I installed solr server on my Ubuntu and  when I use it directly it  
>> runs good, but when I use it remotely using my website it doesnot run 
>> and I don't know what the reason, can you  help me please.
>> 
>> 
>> 
>> Regards,
>> Adel Khalifa
>> 
>> 
>> 
>> 
> 
> 


Re: Making my own search website

2016-03-27 Thread Andrea Gazzarini
Hi Adel,
Absolutely not sure what's happening on (Solr) server side, the first thing
that comes on my mind is: if you're correctly accessing the solr admin
console that means the string you're getting in that resource bundle is
wrong. I'd print out that value in order to make sure about the correctness
of that address or I would hard code the correct string itself.

Best,
Andrea

P.S.: don't create a SolrServer instance for each http request. Better to
define a member instance, initialize it in the init() method and close in
the destroy()...that adheres much better to the servlet threading model.

Hello All,



First, I want to apology for my complexity needs before and that I cannot
asking obviously.



So Now, I create my Solr server and indexing I can log on it directly throw
( http://ip:port/solr/#) from ubuntu server or my windows laptop.

I build my website on netbeans using J2EE on my windows laptop and add a
servlet to access the solr server for searching and when I run it it works
good.



But the problem occurred when I try to run on it on the Ubuntu server it
stopped at : -- SolrServer server = new HttpSolrServer(ip:port/solr/core);

And it does not give me any exception.



I attached the ajax code that I use to call the servlet and also attached
the servlet code.




*Regards,**Adel Khalifa | *Developer *| **Saudisoft-Egypt | ** Tel: *+2 023
303 2037 - *ext *112 | *M *+2 01149247744 | *Fax *+2 023 303 2036 | *Follow
us on **[image: Description: cid:image001.gif@01D11A1D.D81CE0C0]*
*
|
**[image: Description: cid:image002.gif@01D11A1D.D81CE0C0]*
* | **[image: Description:
cid:image003.gif@01D11A1D.D81CE0C0]*

*[image: Description: cid:image004.jpg@01D11A1D.D81CE0C0]*


RE: Making my own search website

2016-03-27 Thread Adel Mohamed Khalifa
Thanks Andrea,

 

I want to say if my string is wrong it would not connect when I connect from 
windows it’s the same code, I did not change in it.

 

SOLR_SERVER_URL=http://172.16.0.72:8983/solr/SearchCore

 

Regards,
Adel Khalifa 

 

 

From: Andrea Gazzarini [mailto:gxs...@gmail.com] 
Sent: Sunday, March 27, 2016 2:22 PM
To: solr-user@lucene.apache.org
Subject: Re: Making my own search website

 

Hi Adel,
Absolutely not sure what's happening on (Solr) server side, the first thing 
that comes on my mind is: if you're correctly accessing the solr admin console 
that means the string you're getting in that resource bundle is wrong. I'd 
print out that value in order to make sure about the correctness of that 
address or I would hard code the correct string itself.

Best,
Andrea

P.S.: don't create a SolrServer instance for each http request. Better to 
define a member instance, initialize it in the init() method and close in the 
destroy()...that adheres much better to the servlet threading model.

Hello All,

 

First, I want to apology for my complexity needs before and that I cannot 
asking obviously.

 

So Now, I create my Solr server and indexing I can log on it directly throw ( 
http://ip:port/solr/#  ) from ubuntu server or my windows 
laptop.

I build my website on netbeans using J2EE on my windows laptop and add a 
servlet to access the solr server for searching and when I run it it works good.

 

But the problem occurred when I try to run on it on the Ubuntu server it 
stopped at : -- SolrServer server = new HttpSolrServer(ip:port/solr/core);

And it does not give me any exception.

 

I attached the ajax code that I use to call the servlet and also attached the 
servlet code.

 

Regards,
Adel Khalifa | Developer | Saudisoft-Egypt |  Tel: +2 023 303 2037 - ext 112 | 
M +2 01149247744   | Fax +2 023 303 2036 | Follow us on 
 

 Description: cid:image001.gif@01D11A1D.D81CE0C0 |  
 Description: cid:image002.gif@01D11A1D.D81CE0C0 
|  

 Description: cid:image003.gif@01D11A1D.D81CE0C0
Description: cid:image004.jpg@01D11A1D.D81CE0C0

 

 



list of ngram

2016-03-27 Thread Shamir, Maya
Hi,
I'm trying to extract all unigram from a collection which stand with the some 
mincount limit.
Currently the limit is facet.mincount. but we want to use mincount of distinct 
count for a field.
For example:

For collection contains these documents:
ID  Field1  content
A   A1  Hello world
B   A1  Hello
C   A1  My world
D   B1  Hello dad

If I want the unigrams with at least 2 documents then world will definitely in.
But if I want the unigrams with at least 2 distinct field1 then I won't receive 
the word world

(currently we work with prefix to get all the ngrams. Attached an example to 
request:
?facet.prefix=z%20&facet.mincount=100&rows=0&facet.field=content&facet.limit=-1&facet.sort=count&facet.method=enum&facet=true&q=%2A%3A%2A
  )

Is there any way I can solve it ?
Im using solr 4.10

Thanks in advance,
Maya



-
Intel Electronics Ltd.

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.


scottchu] How to rebuild master-slave multi-core with schema.xml from old verison in Solr 5.5

2016-03-27 Thread scott.chu

I post a question "How to rebuild master-slave multi-core with schema.xml from 
old verison in Solr 5.5" on stackoverflow. Hoping some expericnes solr people 
can reply me with a suggestive answer. The url is: 
http://stackoverflow.com/questions/36254855/how-to-rebuild-master-slave-multi-core-with-schema-xml-from-old-verison-in-solr

scott.chu,scott@udngroup.com
2016/3/28 (週一)


Re: scottchu] How to rebuild master-slave multi-core with schema.xml from old verison in Solr 5.5

2016-03-27 Thread Reth RM
Hi Scott,

It is same as how we would do in earlier versions of solr.

On the master instance, include the replication handler definition with
master configs(as shown below).
  optimize optimize 
schema.xml,stopwords.txt,elevate.xml  

And on the slave instance, add the master url under slave config:


 
http://localhost:8983/solr/techproducts/replication 00:00:20  

Documentation is here
https://cwiki.apache.org/confluence/display/solr/Index+Replication



On Mon, Mar 28, 2016 at 8:19 AM, scott.chu  wrote:

>
> I post a question "How to rebuild master-slave multi-core with schema.xml
> from old verison in Solr 5.5" on stackoverflow. Hoping some expericnes solr
> people can reply me with a suggestive answer. The url is:
> http://stackoverflow.com/questions/36254855/how-to-rebuild-master-slave-multi-core-with-schema-xml-from-old-verison-in-solr
>
> scott.chu,scott@udngroup.com
> 2016/3/28 (週一)
>


[scottchu] Is it possible to create a new colr in Solr 5.5 using my old schema.xml and solrconfig.xml?

2016-03-27 Thread scott.chu
I have old schema.xml and solrconfig.xml from Solr 3.5. I want to rebuild the 
core structure in Solr 5.5. I got some questions to request for answer or 
suggestions:

1. Can I just put these 2 old xmls into the config folder and issue 
'bin\solr.cmd -c corename -d config folder path' to build a Solr 5.5 core? If 
not, what modification should I make?
(Note: AFAIK, MainIndex and IndexDefaults are replaced IndexConfig and no 
long exist in new solrconfig.xml. Besides, there're no any schema.xmls in Solr 
5.5's examples.)
2. What should I put in that config folder? Are they same as in Solr 3.5's?
3. Is there any special rules where I put the config folder? For example, Do I 
have to put that folder under solr-5.5.0\server\solr\configsets? Is this path 
must be relative to Solr home folder?
4. If the core is created ok, where is the the core folder that Solr has built?
5. Is creating core with schema.xml achievable via admin UI?

Thanks for help in advance!

scott.chu,scott@udngroup.com
2016/3/28 (週一)

P.S. Thanks to Reth RM's reply to my another post(How to rebuild master-slave 
multi-core with schema.xmlfrom old verison in Solr 5.5). I know I can just put 
replicationHanlder into new solrconfig.xml but still need a try.