Re: Delete from Solr index...

2009-04-24 Thread lupiss

You can use solrServer.deleteByQuery("*:*") and then call commit by
solrServer.commit(true, true);

This will erase the index.

-- 
Regards,
Shalin Shekhar Mangar.


hola gracias por contestar! ese comando ya lo había visto, pero borra todo
los índices verdad?, yo quisiera borrar solo un índice de id = 2354345 por
ejemplo, gracias

hello thank you for answering! that time it had already seen it, but erased
all the indexes right?, I just delete an index id = 2354345 for example,
thanks
-- 
View this message in context: 
http://www.nabble.com/Delete-from-Solr-index...-tp10264940p23221035.html
Sent from the Solr - User mailing list archive at Nabble.com.



Re: Delete from Solr index...

2009-04-22 Thread lupiss

hola de nuevo!
es cierto ese comando es el que borra un index, ya lo intenté y sí, así
borraré mis registros de prueba de mi proyecto, estaría bien saber como
borrarlo desde la aplicación mediante solrj, saludos, gracias :)

hello again! 
this is true is the command that erases an index, and I tried and yes, that
blot on my record of my test project, it would be nice to know how to delete
it from your application using solrj, greetings, thank you:)
-- 
View this message in context: 
http://www.nabble.com/Delete-from-Solr-index...-tp10264940p23189684.html
Sent from the Solr - User mailing list archive at Nabble.com.



Re: Best way to index without diacritics

2009-04-22 Thread lupiss

hola de nuevo!

gracias por la yuda, ya pude solucionar lo de los acentos :D
por si a alguien le sirve el tip, todo está en poner en el schema.xml la
clase isolatin mas o menos así:

hello again! 

thanks for the help, I could solve it for the accents: D 
if someone helps the tip, everything is put in the schema.xml ISOLATINO
class more or less like this:


  








  
  

 







  


además los archivos xml que se van a indexar deberán estar codificados en
utf-8, en mi caso uso el solr integrado a una aplicación por lo cual ahora
tengo que ver como enviar la cadena a indexar con codificación utf-8 ,
alguien sabe cómo hacerlo? 

xml files also to be indexed must be encoded in utf-8 in my case I use the
integrated application SOLR so now I see how to send the string with index
utf-8 encoding, someone knows how to do ?

-- 
View this message in context: 
http://www.nabble.com/Best-way-to-index-without-diacritics-tp18935599p23189640.html
Sent from the Solr - User mailing list archive at Nabble.com.



Re: Best way to index without diacritics

2009-04-21 Thread lupiss

hola, gracias por contestar. sí, yo creo que esa es la clase que me servirá,
pero no sé cómo implementarla, podrías decirme si tu ya la haz usado, y si
es así, decirme qué líneas incluíste en el schema.xml, en el config.xml, qué
.jar adjuntaste, etc, todos los detalles, o incluso si tienes un ejemplo que
puedas escribir en el foro por favor, se me hace difícil porque además de
que soy nueva en solr, toda la información está en inglés y pués yo no lo
entiendo muy bien que digamos :(
gracias nuevamente


hi, thanks for reply. yes, I believe that is the class that will serve me,
but I do not know how to implement it, and you could tell me if the beam
used, and if so, tell me what lines included in the schema.xml in
config.xml, which . jar attached, etc, all the details, or even if you have
an example that you can write in the forum please, I also made it difficult
because I am new to SOLR, all information is in English and then I do not
understand very well to say: ( 
thanks again
-- 
View this message in context: 
http://www.nabble.com/Best-way-to-index-without-diacritics-tp18935599p23166430.html
Sent from the Solr - User mailing list archive at Nabble.com.



Re: Delete from Solr index...

2009-04-21 Thread lupiss

Hola!
¿qué tal?

Tengo un problema parecido, necesito borrar algunos índices de mi solr, ya
que los di de alta mientras hacía pruebas y ahora que entregaré el proyecto
necesito que no aparezcan ya, se me complica esto ya que toda la información
de solr está en inglés y pués yo no lo entiendo bien, en fin, espero me
puedan ayudar ya que tengo solo unos días para entregar el proyecto, de
antemano mil gracias! :)

Hello! 
How are you? 

I have a similar problem, I need to delete some of my SOLR indexes, since
the various tests was as high and now that I need to deliver the project
because they do not show, I compounded this, as all information is in
English and SOLR after I do not understand, finally, I hope I can help
because I have just days to deliver the project, a thousand thanks in
advance! :)
-- 
View this message in context: 
http://www.nabble.com/Delete-from-Solr-index...-tp10264940p23159879.html
Sent from the Solr - User mailing list archive at Nabble.com.



Re: Best way to index without diacritics

2009-04-21 Thread lupiss

Hola!

Yo también tengo el mismo problema, ya tengo mis índices de mis documentos
cambie el charset a iso-8859-1 y ya pude ver las ñ y acentos, ahora ligué el
buscador a mi aplicación y desde páginas jsp se hacen búsquedas, el problema
es que cuando el usuario escribe en el text que pide el parámetro de la
consulta debe escribir los acentos, y eso es justamente lo que no quiero,
leí un poco y creo que ocupo incluir la clase isolatin o algo así, pero no
sé bien como, primero se que la debo incluir en el config.xml o en el
schema.xml pero también debo bajar un jar o algo así de la clase isolatin? o
que debo hacer no sé... por favor alguna ayuda!!!? me estoy volviendo loca!
:(


Hello! 

I too have the same problem as I have my documents indexes change charset to
iso-8859-1, and I could see ñ and accents, now linking the browser to my
application from jsp pages are searched, the problem is that when the user
types in the text that requests the parameter of the query must write
accents, and this is what we do not want to, I read a bit and I think the
deal include ISOLATINO class or something, but I do not know as well, first
is that I include in the config.xml or the schema.xml but I download a jar
or something of the kind ISOLATINO? or that I do not know ... please some
help !!!?. I'm going crazy! : (
-- 
View this message in context: 
http://www.nabble.com/Best-way-to-index-without-diacritics-tp18935599p23159812.html
Sent from the Solr - User mailing list archive at Nabble.com.



Re: Problem with UTF-8 and Solr ISOLatin1AccentFilterFactory

2009-03-19 Thread lupiss

hola! yo tengo el mismo problema, ya también había tratado con
ISOLAtin1Accent pero tampoco me funcionó y eso que yo uso otra codificación,
ayuda por favor
:)
-- 
View this message in context: 
http://www.nabble.com/Problem-with-UTF-8-and-Solr-ISOLatin1AccentFilterFactory-tp22607642p22612319.html
Sent from the Solr - User mailing list archive at Nabble.com.



Re: Solrj queries

2008-12-04 Thread lupiss

me faltó ";"
jejeje
-- 
View this message in context: 
http://www.nabble.com/Solrj-queries-tp20494859p20845222.html
Sent from the Solr - User mailing list archive at Nabble.com.



Re: Solrj queries

2008-12-04 Thread lupiss

Hola! soy nueva en solr, yo uso solrj, y tu pregunta es como consultar con
solrj mira, ahí te va una pequeña descripción de lo que puedes hacer:
1. hacer tu jsp o php, etc. donde el usuario introducira el nombre y
apellido, después lees esos valores de tal vez con algun getText.
2. entonces construyes la consulta:
suponiendo que en tu esquema definiste el campo de nombre como name y el de
apellido como lname; y que en el jsp o php (en tu formulario pues) los
campos de texto donde el usuario introduce el nombre y apellido se llaman
nam, lnam, respectivamente, entonces tendrías que hacer algo así:
String Consulta = "name: "+nam.getText();+" lname: "+lnam.getText();
bien hasta ahora solo tienes una cadena que contiene la consulta que le
mandarás a solr, esta cadena la recibe de parámetro el objeto query,
entonces lo construyes:

SolrQuery query;
QueryResponse qrsp;

//función que consulta
   public  SolrDocumentList consultar(String Consulta) throws
SolrServerException {
SolrDocumentList docs;
query = new SolrQuery();
query.setQuery( Consulta );
qrsp = server.query( query ); 
docs= qrsp.getResults();
return docs;
}

entonces solo mandarías llamar esa función pasando de parámetro la cadena
consulta que creaste antes:

consultar(Consulta)

-- 
View this message in context: 
http://www.nabble.com/Solrj-queries-tp20494859p20845145.html
Sent from the Solr - User mailing list archive at Nabble.com.



Re: Pagination with Solr

2008-11-23 Thread lupiss

 ok! gracias ryguasu por tu respuesta, mira que ahora que recuerdo si hay un
setStart y setRows trataré con eso y espero poder terminar mi proyecto, 1000
gracias =)
-- 
View this message in context: 
http://www.nabble.com/Pagination-with-Solr-tp13847908p20650529.html
Sent from the Solr - User mailing list archive at Nabble.com.



Re: solr search

2008-11-21 Thread lupiss

Hola!

soy nueva en solr y tengo el mismo problema, necesito obtener todos los
resultados de cierta consulta y si se puede paginados, de 10 en 10, yo estoy
usando jsolr y jsp en una aplicación web, entonces no sabria donde poner la
nueva url, con el start = 10 y el rows = 10 o algo así, estoy usando struts
entonces la consulta ocurre en una action que ha obtenido los parámetros de
un jsp pegaré parte del código:  

la clase que hace la conexión, consulta y añade, etc...
public class TestSolrClient {
CommonsHttpSolrServer server;
SolrInputDocument doc;
UpdateRequest req;
UpdateResponse rsp;
SolrQuery query;
QueryResponse qrsp;
SolrDocumentList docs;
SolrDocument documento;
   
public TestSolrClient() throws MalformedURLException,
SolrServerException, 
   IOException {
String url = "http://localhost:8080/solr";;
server = new CommonsHttpSolrServer( url );
server.setParser(new XMLResponseParser());
  }  

public void añadir(Campo[] Campos) throws SolrServerException,
IOException {
doc = new SolrInputDocument();
for(int y=0; y








 



 


solo puse una parte donde se recogen los valores introducidos por el
usuario, en realidad la jsp pide un tipo de documento a consultar, luego
sobre ese documento pide que se seleccionen los campos que se consultara y
por ultimo pide que se introduzcan valores para esos campos, despues esos
valores se quedan en memoria en un bean que es accedido desde la action, a
continuación la action que hace la consulta:
public class ConsultarSolrAction extends Action {
  /**This is the main action called from the Struts framework.
 * @param mapping The ActionMapping used to select this instance.
 * @param form The optional ActionForm bean for this request.
 * @param request The HTTP Request we are processing.
 * @param response The HTTP Response we are processing.
 */
public ActionForward execute(ActionMapping mapping, ActionForm form, 
 HttpServletRequest request, 
 HttpServletResponse response) throws
IOException, 
 
ServletException, 
 
SolrServerException {
  //  forma es el bean
ConsultaSolr forma = (ConsultaSolr)form;
List aux=forma.getSeleccionados();
String[] Valores= request.getParameterValues("valores");
forma.añadirConsulta("tipo: "+forma.getTipo()+" ");
if(Valores!=null){
for(int i=0; i0)
{
Campo campo= (Campo)aux.get(i);
System.out.println("Valor: "+ Valores[i]);
if(campo.getNombre().compareTo("general")!=0)
forma.añadirConsulta(campo.getNombre()+": "+Valores[i]+"
");
else
forma.añadirConsulta(Valores[i]+" ");
}
}
}
System.out.println("la consulta a solr sera:" +
forma.getConsulta());
TestSolrClient Solr = new TestSolrClient();
forma.resetValores();
forma.resetSeleccionados();
forma.setListSolr(Solr.consultar(forma.getConsulta()));
forma.reset(mapping,request);
System.out.println("num de resultados:
"+forma.getListSolr().size());
if(forma.getListSolr().isEmpty())
return mapping.findForward( "Error");
else
return mapping.findForward( "success");
  }  
}

despues de aqui se va a otra jsp que muestra los resultados, el problema es
que hago una consulta que tiene numfound=600 y solo muestra los 10 primeros
y yo quiero todos!!
help please!!
-- 
View this message in context: 
http://www.nabble.com/solr-search-tp17249602p20628977.html
Sent from the Solr - User mailing list archive at Nabble.com.



Re: Pagination with Solr

2008-11-21 Thread lupiss

Hola!
soy nueva en solr, lo estoy usando para mi proyecto de residencias, el
problema que tengo es similar al que dice david, necesito enviar todos los
resultados de cierta consulta al cliente, sin embargo siempre puedo obtener
solamente 10, los diez primeros, y yo necesito obtener todos, yo estoy
usando solrj y puedo obtener el numfound, sin embargo no puedo obtener todos
los resultados =(, hay alguien que pueda ayudarme?

gracias =)
-- 
View this message in context: 
http://www.nabble.com/Pagination-with-Solr-tp13847908p20628504.html
Sent from the Solr - User mailing list archive at Nabble.com.