data import handler issue

2011-10-25 Thread Tanweer Noor
Hi,
I am having issue in fetching records from db, I am using *eXist* database.
Please see if you can help in looking into this.

http://localhost:8983/solr/dataimport?command=full-import


 -  <
response>
 -  
   0
   0
   
 -  
 -  
   data-config.xml
  
  
   full-import
   idle
   
 -  
   1
   <*str name="Total Rows Fetched">0*
   0
   2011-10-25 01:58:24
   *Indexing completed. Added/Updated: 0 documents. Deleted 0
documents.*
   2011-10-25 01:58:24
   2011-10-25 01:58:24
   0
   0:0:0.219
  
   This response format is experimental. It is likely
to change in the future.
  

below is my data-config.xml file




http://localhost:8081/exist/servlet/db/dbname/?_query=for%20$p%20in%20//Music%20return%20$p
"
processor="XPathEntityProcessor"
forEach="/data/store"
transformer="DateFormatTransformer">
 
   
  

  
  
  
  
  
  

 
 






If i go to URL, I can see that it is fetching record from database but
somehow, solr is not fetching a single row.

http://localhost:8081/exist/servlet/db/dbname/?_query=for%20$p%20in%20//Music%20return%20$p



Thanks


Re: how to rename a schema field, whose values are indexed already?

2009-10-08 Thread noor

Without re-indexing the data,
how to rename, any one of the schema field ??

Sandeep Tagore wrote:

I guess you cant do it. I tried it before. I had a field with name 'KEYWORD'
and i changed it to 'keyword' and it didn't work. Everything else was normal
and I searched with 'KEYWORD' i got an exception saying undefined field and
I searched with 'keyword' , I got 0 results. It didn't work even after
optimizing. I re-indexed the data and it worked. 


Regards,
Sandeep


M.Noor wrote:
  

 how to rename a schema field, if its values are indexed already ??






Re: how to rename a schema field, whose values are indexed already?

2009-10-08 Thread noor

Without re-indexing the data,
how i rename, any one of the schema field ??

Sandeep Tagore wrote:

I guess you cant do it. I tried it before. I had a field with name 'KEYWORD'
and i changed it to 'keyword' and it didn't work. Everything else was normal
and I searched with 'KEYWORD' i got an exception saying undefined field and
I searched with 'keyword' , I got 0 results. It didn't work even after
optimizing. I re-indexed the data and it worked. 


Regards,
Sandeep


M.Noor wrote:
  

 how to rename a schema field, if its values are indexed already ??






how to rename a schema field, whose values are indexed already?

2009-10-08 Thread Noor

In solr,

how to rename a schema field, if its values are indexed already ??
anybody please tell your suggestions..

for example,
If i have a schema field named "subTitle", now i want to rename as 
"subtitle". What i need to do for this change ??


regards,
Noor


Re: solr indexing on same set of records with different value of unique field, not working fine.

2009-07-30 Thread noor

Sorry, schema.xml file is here in this mail...

noor wrote:

FYI
 Attached schema.xml file.
 And the add doc xml snippets are,

  
501
ESQ.VISION.A72
201
CpuLoopEnd Process=$Z4B1 CpuPin=0,992 
Program=\VEGAS.$SYSTEM.SYS00.MEASFH Terminal=\VEGAS.$TSPM.#TERM 
CpuBusy=0 MemPage=24 User=50,10

\VEGAS.$QQDS
PLGOVNPM
2008-10-07T03:00:30.0Z
2008-10-07T10:02:27.95Z
1247905648000
   
   .


i just load the currentTimeStamps long value into the add doc xml to 
load into solr.



Chris Hostetter wrote:
I'm not really understanding how you could get the situation you 
describe ... which suggests that one (or both) of us don't understand 
exactly what happened.


if you can post the actual schema.xml file you used and an example of 
the input you indexed perhaps we can spot the discrepency.


FWIW: using a timestamp as a uniqueKey doesn't make much sense ...

 1) if you have heavy parallelization two docs indexed at the exact 
same time might overwrite eachother.
 2) you have no way of ever replacing an existing doc (unless you 
roll the clock back) in which case there's no advantage to using 
a uniqueKey -- so you might as leave it out of your schema (which 
makes indexing slightly faster)

: I need to run around 10 million records to index, by solr.
: I has nearly 2lakh records, so i made a program to looping it till 
10 million.
: Here, i specified 20 fields in schema.xml file. the unoque field i 
set was,

: currentTimeStamp field.
: So, when i run the loader program (which loads xml data into solr) 
it creates

: currentTimestamp value...and loads into solr.
: : For this situation,
: i stopped the loader program, after 100 records indexed into solr.
: Then again, i run the loader program for the SAME 100 records to 
indexed

: means,
: the solr results 100, rather than 200.
: : Because, i set currentTimeStamp field as uniqueField. So i expect 
the result

: as 200, if i run again the same 100 records...
: : Any suggestions please...



-Hoss


  











  





















































 








 





















 















 






   
   

		


























   
   
   

   
   

   
   


   
   

   
   
   










   


   
   


 

evid

 
text

 



  



	 
	 
 
 
 
 
 
 
 
 
 
 
 

 

 
 

 

 
 


   

 
 
 
 



Re: solr indexing on same set of records with different value of unique field, not working fine.

2009-07-30 Thread noor

FYI
 Attached schema.xml file.
 And the add doc xml snippets are,

  
501
ESQ.VISION.A72
201
CpuLoopEnd Process=$Z4B1 CpuPin=0,992 
Program=\VEGAS.$SYSTEM.SYS00.MEASFH Terminal=\VEGAS.$TSPM.#TERM 
CpuBusy=0 MemPage=24 User=50,10

\VEGAS.$QQDS
PLGOVNPM
2008-10-07T03:00:30.0Z
2008-10-07T10:02:27.95Z
1247905648000
   
   .


i just load the currentTimeStamps long value into the add doc xml to 
load into solr.



Chris Hostetter wrote:
I'm not really understanding how you could get the situation you describe 
... which suggests that one (or both) of us don't understand exactly what 
happened.


if you can post the actual schema.xml file you used and an example of the 
input you indexed perhaps we can spot the discrepency.


FWIW: using a timestamp as a uniqueKey doesn't make much sense ...

 1) if you have heavy parallelization two docs indexed at the exact same 
time might overwrite eachother.
 2) you have no way of ever replacing an existing doc (unless you roll the 
clock back) in which case there's no advantage to using a uniqueKey -- 
so you might as leave it out of your schema (which makes indexing 
slightly faster) 


: I need to run around 10 million records to index, by solr.
: I has nearly 2lakh records, so i made a program to looping it till 10 million.
: Here, i specified 20 fields in schema.xml file. the unoque field i set was,
: currentTimeStamp field.
: So, when i run the loader program (which loads xml data into solr) it creates
: currentTimestamp value...and loads into solr.
: 
: For this situation,

: i stopped the loader program, after 100 records indexed into solr.
: Then again, i run the loader program for the SAME 100 records to indexed
: means,
: the solr results 100, rather than 200.
: 
: Because, i set currentTimeStamp field as uniqueField. So i expect the result

: as 200, if i run again the same 100 records...
: 
: Any suggestions please...




-Hoss


  




solr indexing on same set of records with different value of unique field...not working...

2009-07-20 Thread Noor

hi,

I need to run around 10 million records to index, by solr.
I has nearly 2lakh records, so i made a program to looping it till 10 
million.
Here, i specified 20 fields in schema.xml file. the unoque field i set 
was, currentTimeStamp field.
So, when i run the loader program (which loads xml data into solr) it 
creates currentTimestamp value...and loads into solr.


For this situation,
i stopped the loader program, after 100 records indexed into solr.
Then again, i run the loader program for the SAME 100 records to indexed 
means,

the solr results 100, rather than 200.

Because, i set currentTimeStamp field as uniqueField. So i expect the 
result as 200, if i run again the same 100 records...


Any suggestions please...

regards,
Noor




Need to know about Custom request with filters in solr ?????

2009-06-24 Thread Noor

Hi,
  We're working on apache solr. We need some feature for appending 
some constraints(filters) with incoming solr query(request). The solr 
should response for the incoming query with the specified constraints 
meets.
We made the posting operation in java, it retrieved all the sql data and 
make it as xml;
Then it performs indexing and storing into solr data.  


regards,
Noor


AttachDebugger in Netbeans, for solr ???

2009-06-17 Thread noor

hi,
i am new to solr.
I am having the solr package, and it starts running in my pc.
I created the custom handler class as a java project through Netbeans.
  And i put that jar in solr webapps's lib folder; and in 
solr-config.xml also i changed. before solr gets started.
What i need to do is debugging. I dont know about Netbeans 
Attach-Debugger facility.???


How do we use Netbeans attach-debugger facility, to debug my code, when 
solr runs...???


regards,
Noor


Re: Custom Request handler Error:

2009-06-16 Thread noor

how to create a custom update handler, to update my fields... ?
Also, how to make the update, through url, i mean,

http://localhost:8983/solr/update/../ like that... ???




noor wrote:

Yes, i changed "custom" into "/custom", now it calls my class.
But, in browser, It shows
Null RequestHandler null.

So, i need to accept my changes by solr. For that, what i need to do,
pls guide me to acheive this.


Noble Paul wrote:

register is as follows
class="org.apache.solr.my.MyCustomHandler">


the request must be made to the uri "/custom" only then the requests
would come to your handler

On Sat, Jun 13, 2009 at 5:49 PM, noor wrote:
 

Yes, i changed requestHandler name as,
class="org.apache.solr.my.MyCustomHandler">

.

Then also,
In statistics page, my custom handler under QueryHandler's request 
count

remains 0. It shows that, the webrequest is not coming to my class

Noble Paul wrote:
   

register your handler in some other name and fire a request to that

On Fri, Jun 12, 2009 at 8:07 PM, noor wrote:

 

I solved this NullPointerException, by the following changes.

In java code:
public void handleRequestBody(SolrQueryRequest request, 
SolrQueryResponse

response) throws Exception {
SolrCore coreToRequest =
request.getCore();//coreContainer.getCore("core2");
.
}

and in solr-config.xml:


explicit
tandem
true



Now, my webapp runs fine by,
http://localhost:8983/mysearch
searching also working fine.
But, these are not run through my custom handler. So i felt, it 
wrongly

doing searching.
Because, in solr admin statistics page,
my custom handler under QueryHandler's request count remains 0, it
doesn't
get incremented, when i search something. Rather, 
statndardReqHandler's

request count is incremented.

And another thing, how do we debug solr. ???
Please anybody help me to solve this ...

Thanks in advance.

Noble Paul ??? ?? wrote:

   

is there any error on the console?

On Fri, Jun 12, 2009 at 4:26 PM, Noor 
wrote:



 

hi,
 i am new to apache solr.
I need to create a custom request handler class. So i create a 
new one

and
changed the solr-config.xml file as,
 

explicit
tandem
true

 

And in my java class, the code is,

public class MyCustomHandler extends RequestHandlerBase{
 public CoreContainer coreContainer;
 public void handleRequestBody(SolrQueryRequest request,
SolrQueryResponse
response) throws Exception {
SolrCore coreToRequest = coreContainer.getCore("core2");
ModifiableSolrParams params = new ModifiableSolrParams();
params.set("echoParams", "explicit");
params.set("q", "text");
params.set("debugQuery", "true");
request = new LocalSolrQueryRequest(coreToRequest, params);
// SolrRequestHandler reqHandler =
coreToRequest.getRequestHandler("/select");
coreToRequest.execute(reqHandler, request, response);
coreToRequest.close();
request.close();
 }
 // the abstract methods - getDescription(), getSourceId(),
getSource(),
getVersion() are //overrided... but these methods doesn't have any
implementations.
}


But, if i search any text in my webapp from browser, gots the 
HTTP 500

error.
i dont know how SolrContainer is intialized
Pls anyone give me the solution...

thanks and regards,
Mohamed






  




  





  







Re: Debug Solr in Netbeans..

2009-06-16 Thread noor

Yes Mark Miller,
I changed the Connector specification in attach-debugger dialog,
from SocketAttach TO socketListen.

Now i got the netbeans debugger-console output as,
Listening on 5005

But, nothing will be display after that, but the progress shows, 
attaching debugger


What is the problem 

thanks and regards,
Noor

noor wrote:

Addition to my previous reply::

I am running solr by start.jar file. It has my custom class jar file 
in its lib folder.

Also in netbeans, custom class source has the checkpoint to debug.;
and in the project folder, i created the build.properties.
So i set the AttachDebugger settings; but it gives the connection 
refused error:


I don't know, i am doing correctly 
Please anyone help me to solve this ...

thanks and regards
Noorulla

noor wrote:

Now, i put that build.properties file in the solr location tooo.
But still i am getting.

Attaching to localhost:5005
Connection refused

Note:
Solr lib folder contains, my custom class's jar file.
But in netbeans, i am doing the attach-debugger processing.
And in browser, i am accessing that class setting as,
http://localhost:8983/solr/custom?q=searchText&debugQuery=true
Browser page also gives Null error.

Is this way correct.

For your information,
pls see about my custom handler settings on the following page:
http://markmail.org/message/uvm5xp3ld5mmd5or?q=custom+solr+handler+error: 





Mark Miller wrote:
If you don't see that, you may have build.properties in the wrong 
place.


When you run 'solr-example' in debug mode, Listening for transport 
dt_socket at address: 5005 will be printed to STD out.


Once you have that working correctly, you want to attach to port 
5005, not 8983. Solr runs on 8983, but the debugger is listening on 
5005.



- Mark

noor wrote:

No.
In netbeans, debugger-console output shows,

Attaching to localhost:8983
handshake failed - connection prematurally closed

i dont know where the problem is ?

Mark Miller wrote:
Do you see the following printed to std out when you start solr 
(using 'run-example')?


Listening for transport dt_socket at address: 5005

noor wrote:

Addition to the previous reply:
I built my custom project and put into solr webapps lib folder.
And starts running solr.
In netbeans, i made the changes as i said before.
But it shows connection refused error.

anybody please give me the solution...

noor wrote:

Solr starts running in the port 8983,
i created build.properties in the project folder, where the 
build.xml is.

And in that empty build.properties file,
i added,
example.debug=true
only.
And in Netbeans, Debug -> Attach Debugger,
- Debugger is JavaDebugger(JPDA);
- Connector is SocketAttach(Attaches by socket to other VMs)
- HOST is localhost;
- Port as 5005;
and Timeout is empty.

During solr running, i set this, but in the output screen shows 
"Connection is refused."


Is my changes are correct ??? or i need to change anything else...


thanks and regards,
Noor


Mark Miller wrote:

noor wrote:

hi, i am new to apache solr.
i got the solr source code, and i created my own (custom) 
classes.
Also, i make the request reference to that newly created 
classes in solr-config.xml.


now i need to debug my code, when the solr search calls my 
class..

So, for this, i dont know how to debug my code?

Please anybody help me to achieve this.

thanks and regards,
Noor



Make a file next to build.xml called build.properties.

Add to the empty file: example.debug=true

Run the ant target 'run-example' in build.xml.

Solr will run with the ability to connect with a remote 
debugger on port 5005.


In Netbeans, from the main menu, select Debug > Attach 
Debugger... (In NetBeans 6.1 and older select Run > Attach 
Debugger...).


Follow the dialogue box prompts to connect to the running Solr 
example.


























Re: Debug Solr in Netbeans..

2009-06-15 Thread noor

Addition to my previous reply::

I am running solr by start.jar file. It has my custom class jar file in 
its lib folder.

Also in netbeans, custom class source has the checkpoint to debug.;
and in the project folder, i created the build.properties.
So i set the AttachDebugger settings; but it gives the connection 
refused error:


I don't know, i am doing correctly 
Please anyone help me to solve this ...

thanks and regards
Noorulla

noor wrote:

Now, i put that build.properties file in the solr location tooo.
But still i am getting.

Attaching to localhost:5005
Connection refused

Note:
Solr lib folder contains, my custom class's jar file.
But in netbeans, i am doing the attach-debugger processing.
And in browser, i am accessing that class setting as,
http://localhost:8983/solr/custom?q=searchText&debugQuery=true
Browser page also gives Null error.

Is this way correct.

For your information,
pls see about my custom handler settings on the following page:
http://markmail.org/message/uvm5xp3ld5mmd5or?q=custom+solr+handler+error:



Mark Miller wrote:

If you don't see that, you may have build.properties in the wrong place.

When you run 'solr-example' in debug mode, Listening for transport 
dt_socket at address: 5005 will be printed to STD out.


Once you have that working correctly, you want to attach to port 
5005, not 8983. Solr runs on 8983, but the debugger is listening on 
5005.



- Mark

noor wrote:

No.
In netbeans, debugger-console output shows,

Attaching to localhost:8983
handshake failed - connection prematurally closed

i dont know where the problem is ?

Mark Miller wrote:
Do you see the following printed to std out when you start solr 
(using 'run-example')?


Listening for transport dt_socket at address: 5005

noor wrote:

Addition to the previous reply:
I built my custom project and put into solr webapps lib folder.
And starts running solr.
In netbeans, i made the changes as i said before.
But it shows connection refused error.

anybody please give me the solution...

noor wrote:

Solr starts running in the port 8983,
i created build.properties in the project folder, where the 
build.xml is.

And in that empty build.properties file,
i added,
example.debug=true
only.
And in Netbeans, Debug -> Attach Debugger,
- Debugger is JavaDebugger(JPDA);
- Connector is SocketAttach(Attaches by socket to other VMs)
- HOST is localhost;
- Port as 5005;
and Timeout is empty.

During solr running, i set this, but in the output screen shows 
"Connection is refused."


Is my changes are correct ??? or i need to change anything else...


thanks and regards,
Noor


Mark Miller wrote:

noor wrote:

hi, i am new to apache solr.
i got the solr source code, and i created my own (custom) classes.
Also, i make the request reference to that newly created 
classes in solr-config.xml.


now i need to debug my code, when the solr search calls my class..
So, for this, i dont know how to debug my code?

Please anybody help me to achieve this.

thanks and regards,
Noor



Make a file next to build.xml called build.properties.

Add to the empty file: example.debug=true

Run the ant target 'run-example' in build.xml.

Solr will run with the ability to connect with a remote debugger 
on port 5005.


In Netbeans, from the main menu, select Debug > Attach 
Debugger... (In NetBeans 6.1 and older select Run > Attach 
Debugger...).


Follow the dialogue box prompts to connect to the running Solr 
example.























Re: Debug Solr in Netbeans..

2009-06-15 Thread noor

Now, i put that build.properties file in the solr location tooo.
But still i am getting.

Attaching to localhost:5005
Connection refused

Note:
Solr lib folder contains, my custom class's jar file.
But in netbeans, i am doing the attach-debugger processing.
And in browser, i am accessing that class setting as,
http://localhost:8983/solr/custom?q=searchText&debugQuery=true
Browser page also gives Null error.

Is this way correct.

For your information,
pls see about my custom handler settings on the following page:
http://markmail.org/message/uvm5xp3ld5mmd5or?q=custom+solr+handler+error:



Mark Miller wrote:

If you don't see that, you may have build.properties in the wrong place.

When you run 'solr-example' in debug mode, Listening for transport 
dt_socket at address: 5005 will be printed to STD out.


Once you have that working correctly, you want to attach to port 5005, 
not 8983. Solr runs on 8983, but the debugger is listening on 5005.



- Mark

noor wrote:

No.
In netbeans, debugger-console output shows,

Attaching to localhost:8983
handshake failed - connection prematurally closed

i dont know where the problem is ?

Mark Miller wrote:
Do you see the following printed to std out when you start solr 
(using 'run-example')?


Listening for transport dt_socket at address: 5005

noor wrote:

Addition to the previous reply:
I built my custom project and put into solr webapps lib folder.
And starts running solr.
In netbeans, i made the changes as i said before.
But it shows connection refused error.

anybody please give me the solution...

noor wrote:

Solr starts running in the port 8983,
i created build.properties in the project folder, where the 
build.xml is.

And in that empty build.properties file,
i added,
example.debug=true
only.
And in Netbeans, Debug -> Attach Debugger,
- Debugger is JavaDebugger(JPDA);
- Connector is SocketAttach(Attaches by socket to other VMs)
- HOST is localhost;
- Port as 5005;
and Timeout is empty.

During solr running, i set this, but in the output screen shows 
"Connection is refused."


Is my changes are correct ??? or i need to change anything else...


thanks and regards,
Noor


Mark Miller wrote:

noor wrote:

hi, i am new to apache solr.
i got the solr source code, and i created my own (custom) classes.
Also, i make the request reference to that newly created classes 
in solr-config.xml.


now i need to debug my code, when the solr search calls my class..
So, for this, i dont know how to debug my code?

Please anybody help me to achieve this.

thanks and regards,
Noor



Make a file next to build.xml called build.properties.

Add to the empty file: example.debug=true

Run the ant target 'run-example' in build.xml.

Solr will run with the ability to connect with a remote debugger 
on port 5005.


In Netbeans, from the main menu, select Debug > Attach 
Debugger... (In NetBeans 6.1 and older select Run > Attach 
Debugger...).


Follow the dialogue box prompts to connect to the running Solr 
example.



















Re: Debug Solr in Netbeans..

2009-06-15 Thread noor

No.
In netbeans, debugger-console output shows,

Attaching to localhost:8983
handshake failed - connection prematurally closed

i dont know where the problem is ?

Mark Miller wrote:
Do you see the following printed to std out when you start solr (using 
'run-example')?


Listening for transport dt_socket at address: 5005

noor wrote:

Addition to the previous reply:
I built my custom project and put into solr webapps lib folder.
And starts running solr.
In netbeans, i made the changes as i said before.
But it shows connection refused error.

anybody please give me the solution...

noor wrote:

Solr starts running in the port 8983,
i created build.properties in the project folder, where the 
build.xml is.

And in that empty build.properties file,
i added,
example.debug=true
only.
And in Netbeans, Debug -> Attach Debugger,
- Debugger is JavaDebugger(JPDA);
- Connector is SocketAttach(Attaches by socket to other VMs)
- HOST is localhost;
- Port as 5005;
and Timeout is empty.

During solr running, i set this, but in the output screen shows 
"Connection is refused."


Is my changes are correct ??? or i need to change anything else...


thanks and regards,
Noor


Mark Miller wrote:

noor wrote:

hi, i am new to apache solr.
i got the solr source code, and i created my own (custom) classes.
Also, i make the request reference to that newly created classes 
in solr-config.xml.


now i need to debug my code, when the solr search calls my class..
So, for this, i dont know how to debug my code?

Please anybody help me to achieve this.

thanks and regards,
Noor



Make a file next to build.xml called build.properties.

Add to the empty file: example.debug=true

Run the ant target 'run-example' in build.xml.

Solr will run with the ability to connect with a remote debugger on 
port 5005.


In Netbeans, from the main menu, select Debug > Attach Debugger... 
(In NetBeans 6.1 and older select Run > Attach Debugger...).


Follow the dialogue box prompts to connect to the running Solr 
example.














Re: Debug Solr in Netbeans..

2009-06-15 Thread noor

Addition to the previous reply:
I built my custom project and put into solr webapps lib folder.
And starts running solr.
In netbeans, i made the changes as i said before.
But it shows connection refused error.

anybody please give me the solution...

noor wrote:

Solr starts running in the port 8983,
i created build.properties in the project folder, where the build.xml is.
And in that empty build.properties file,
i added,
example.debug=true
only.
And in Netbeans, Debug -> Attach Debugger,
- Debugger is JavaDebugger(JPDA);
- Connector is SocketAttach(Attaches by socket to other VMs)
- HOST is localhost;
- Port as 5005;
and Timeout is empty.

During solr running, i set this, but in the output screen shows 
"Connection is refused."


Is my changes are correct ??? or i need to change anything else...


thanks and regards,
Noor


Mark Miller wrote:

noor wrote:

hi, i am new to apache solr.
i got the solr source code, and i created my own (custom) classes.
Also, i make the request reference to that newly created classes in 
solr-config.xml.


now i need to debug my code, when the solr search calls my class..
So, for this, i dont know how to debug my code?

Please anybody help me to achieve this.

thanks and regards,
Noor



Make a file next to build.xml called build.properties.

Add to the empty file: example.debug=true

Run the ant target 'run-example' in build.xml.

Solr will run with the ability to connect with a remote debugger on 
port 5005.


In Netbeans, from the main menu, select Debug > Attach Debugger... 
(In NetBeans 6.1 and older select Run > Attach Debugger...).


Follow the dialogue box prompts to connect to the running Solr example.








Re: Debug Solr in Netbeans..

2009-06-15 Thread noor

Solr starts running in the port 8983,
i created build.properties in the project folder, where the build.xml is.
And in that empty build.properties file,
i added,
example.debug=true
only.
And in Netbeans, Debug -> Attach Debugger,
- Debugger is JavaDebugger(JPDA);
- Connector is SocketAttach(Attaches by socket to other VMs)
- HOST is localhost;
- Port as 5005;
and Timeout is empty.

During solr running, i set this, but in the output screen shows 
"Connection is refused."


Is my changes are correct ??? or i need to change anything else...


thanks and regards,
Noor


Mark Miller wrote:

noor wrote:

hi, i am new to apache solr.
i got the solr source code, and i created my own (custom) classes.
Also, i make the request reference to that newly created classes in 
solr-config.xml.


now i need to debug my code, when the solr search calls my class..
So, for this, i dont know how to debug my code?

Please anybody help me to achieve this.

thanks and regards,
Noor



Make a file next to build.xml called build.properties.

Add to the empty file: example.debug=true

Run the ant target 'run-example' in build.xml.

Solr will run with the ability to connect with a remote debugger on 
port 5005.


In Netbeans, from the main menu, select Debug > Attach Debugger... (In 
NetBeans 6.1 and older select Run > Attach Debugger...).


Follow the dialogue box prompts to connect to the running Solr example.





Debug Solr in Netbeans..

2009-06-15 Thread noor
hi, 
i am new to apache solr.

i got the solr source code, and i created my own (custom) classes.
Also, i make the request reference to that newly created classes in 
solr-config.xml.


now i need to debug my code, when the solr search calls my class..
So, for this, i dont know how to debug my code?

Please anybody help me to achieve this.

thanks and regards,
Noor




Re: Custom Request handler Error:

2009-06-15 Thread Noor

I want Solr, to accept my custom class changes and run it.
So for this, pls anyone guide me to achieve this..

noor wrote:

Yes, i changed "custom" into "/custom", now it calls my class.
But, in browser, It shows
Null RequestHandler null.

So, i need to accept my changes by solr. For that, what i need to do,
pls guide me to acheive this.


Noble Paul wrote:

register is as follows
class="org.apache.solr.my.MyCustomHandler">


the request must be made to the uri "/custom" only then the requests
would come to your handler

On Sat, Jun 13, 2009 at 5:49 PM, noor wrote:
 

Yes, i changed requestHandler name as,
class="org.apache.solr.my.MyCustomHandler">

.

Then also,
In statistics page, my custom handler under QueryHandler's request 
count

remains 0. It shows that, the webrequest is not coming to my class

Noble Paul wrote:
   

register your handler in some other name and fire a request to that

On Fri, Jun 12, 2009 at 8:07 PM, noor wrote:

 

I solved this NullPointerException, by the following changes.

In java code:
public void handleRequestBody(SolrQueryRequest request, 
SolrQueryResponse

response) throws Exception {
SolrCore coreToRequest =
request.getCore();//coreContainer.getCore("core2");
.
}

and in solr-config.xml:


explicit
tandem
true



Now, my webapp runs fine by,
http://localhost:8983/mysearch
searching also working fine.
But, these are not run through my custom handler. So i felt, it 
wrongly

doing searching.
Because, in solr admin statistics page,
my custom handler under QueryHandler's request count remains 0, it
doesn't
get incremented, when i search something. Rather, 
statndardReqHandler's

request count is incremented.

And another thing, how do we debug solr. ???
Please anybody help me to solve this ...

Thanks in advance.

Noble Paul ??? ?? wrote:

   

is there any error on the console?

On Fri, Jun 12, 2009 at 4:26 PM, Noor 
wrote:



 

hi,
 i am new to apache solr.
I need to create a custom request handler class. So i create a 
new one

and
changed the solr-config.xml file as,
 

explicit
tandem
true

 

And in my java class, the code is,

public class MyCustomHandler extends RequestHandlerBase{
 public CoreContainer coreContainer;
 public void handleRequestBody(SolrQueryRequest request,
SolrQueryResponse
response) throws Exception {
SolrCore coreToRequest = coreContainer.getCore("core2");
ModifiableSolrParams params = new ModifiableSolrParams();
params.set("echoParams", "explicit");
params.set("q", "text");
params.set("debugQuery", "true");
request = new LocalSolrQueryRequest(coreToRequest, params);
// SolrRequestHandler reqHandler =
coreToRequest.getRequestHandler("/select");
coreToRequest.execute(reqHandler, request, response);
coreToRequest.close();
request.close();
 }
 // the abstract methods - getDescription(), getSourceId(),
getSource(),
getVersion() are //overrided... but these methods doesn't have any
implementations.
}


But, if i search any text in my webapp from browser, gots the 
HTTP 500

error.
i dont know how SolrContainer is intialized
Pls anyone give me the solution...

thanks and regards,
Mohamed






  




  





  







Re: Custom Request handler Error:

2009-06-13 Thread noor

Yes, i changed "custom" into "/custom", now it calls my class.
But, in browser, It shows
Null RequestHandler null.

So, i need to accept my changes by solr. For that, what i need to do,
pls guide me to acheive this.


Noble Paul wrote:

register is as follows


the request must be made to the uri "/custom" only then the requests
would come to your handler

On Sat, Jun 13, 2009 at 5:49 PM, noor wrote:
  

Yes, i changed requestHandler name as,

.

Then also,
In statistics page, my custom handler under QueryHandler's request count
remains 0. It shows that, the webrequest is not coming to my class

Noble Paul wrote:


register your handler in some other name and fire a request to that

On Fri, Jun 12, 2009 at 8:07 PM, noor wrote:

  

I solved this NullPointerException, by the following changes.

In java code:
public void handleRequestBody(SolrQueryRequest request, SolrQueryResponse
response) throws Exception {
SolrCore coreToRequest =
request.getCore();//coreContainer.getCore("core2");
.
}

and in solr-config.xml:


explicit
tandem
true



Now, my webapp runs fine by,
http://localhost:8983/mysearch
searching also working fine.
But, these are not run through my custom handler. So i felt, it wrongly
doing searching.
Because, in solr admin statistics page,
my custom handler under QueryHandler's request count remains 0, it
doesn't
get incremented, when i search something. Rather, statndardReqHandler's
request count is incremented.

And another thing, how do we debug solr. ???
Please anybody help me to solve this ...

Thanks in advance.

Noble Paul ??? ?? wrote:



is there any error on the console?

On Fri, Jun 12, 2009 at 4:26 PM, Noor wrote:


  

hi,
 i am new to apache solr.
I need to create a custom request handler class. So i create a new one
and
changed the solr-config.xml file as,
 

explicit
tandem
true

 

And in my java class, the code is,

public class MyCustomHandler extends RequestHandlerBase{
 public CoreContainer coreContainer;
 public void handleRequestBody(SolrQueryRequest request,
SolrQueryResponse
response) throws Exception {
SolrCore coreToRequest = coreContainer.getCore("core2");
ModifiableSolrParams params = new ModifiableSolrParams();
params.set("echoParams", "explicit");
params.set("q", "text");
params.set("debugQuery", "true");
request = new LocalSolrQueryRequest(coreToRequest, params);
// SolrRequestHandler reqHandler =
coreToRequest.getRequestHandler("/select");
coreToRequest.execute(reqHandler, request, response);
coreToRequest.close();
request.close();
 }
 // the abstract methods - getDescription(), getSourceId(),
getSource(),
getVersion() are //overrided... but these methods doesn't have any
implementations.
}


But, if i search any text in my webapp from browser, gots the HTTP 500
error.
i dont know how SolrContainer is intialized
Pls anyone give me the solution...

thanks and regards,
Mohamed






  




  





  




Re: Custom Request handler Error:

2009-06-13 Thread noor

Yes, i changed requestHandler name as,

.

Then also,
In statistics page, my custom handler under QueryHandler's request count 
remains 0. It shows that, the webrequest is not coming to my class


Noble Paul wrote:

register your handler in some other name and fire a request to that

On Fri, Jun 12, 2009 at 8:07 PM, noor wrote:
  

I solved this NullPointerException, by the following changes.

In java code:
public void handleRequestBody(SolrQueryRequest request, SolrQueryResponse
response) throws Exception {
SolrCore coreToRequest = request.getCore();//coreContainer.getCore("core2");
.
}

and in solr-config.xml:


explicit
tandem
true



Now, my webapp runs fine by,
http://localhost:8983/mysearch
searching also working fine.
But, these are not run through my custom handler. So i felt, it wrongly
doing searching.
Because, in solr admin statistics page,
my custom handler under QueryHandler's request count remains 0, it doesn't
get incremented, when i search something. Rather, statndardReqHandler's
request count is incremented.

And another thing, how do we debug solr. ???
Please anybody help me to solve this ...

Thanks in advance.

Noble Paul ??? ?? wrote:


is there any error on the console?

On Fri, Jun 12, 2009 at 4:26 PM, Noor wrote:

  

hi,
 i am new to apache solr.
I need to create a custom request handler class. So i create a new one
and
changed the solr-config.xml file as,
 
 
 explicit
 tandem
 true
 
 

And in my java class, the code is,

public class MyCustomHandler extends RequestHandlerBase{
 public CoreContainer coreContainer;
 public void handleRequestBody(SolrQueryRequest request,
SolrQueryResponse
response) throws Exception {
 SolrCore coreToRequest = coreContainer.getCore("core2");
 ModifiableSolrParams params = new ModifiableSolrParams();
 params.set("echoParams", "explicit");
 params.set("q", "text");
 params.set("debugQuery", "true");
request = new LocalSolrQueryRequest(coreToRequest, params);
// SolrRequestHandler reqHandler =
coreToRequest.getRequestHandler("/select");
 coreToRequest.execute(reqHandler, request, response);
 coreToRequest.close();
 request.close();
 }
 // the abstract methods - getDescription(), getSourceId(), getSource(),
getVersion() are //overrided... but these methods doesn't have any
implementations.
}


But, if i search any text in my webapp from browser, gots the HTTP 500
error.
i dont know how SolrContainer is intialized
Pls anyone give me the solution...

thanks and regards,
Mohamed






  





  




Re: Custom Request handler Error:

2009-06-12 Thread noor

Shalin Shekhar Mangar wrote:

On Fri, Jun 12, 2009 at 8:07 PM, noor  wrote:

  



explicit
tandem
true



Now, my webapp runs fine by,
http://localhost:8983/mysearch
searching also working fine.
But, these are not run through my custom handler.




Specify the full package to your handler class. Packages starting with
"solr" are loaded in a special way.

  
I specified like 


.
But still the same error.


Re: Custom Request handler Error:

2009-06-12 Thread noor

I solved this NullPointerException, by the following changes.

In java code:
public void handleRequestBody(SolrQueryRequest request, 
SolrQueryResponse response) throws Exception {

SolrCore coreToRequest = request.getCore();//coreContainer.getCore("core2");
.
}

and in solr-config.xml:


explicit
tandem
true



Now, my webapp runs fine by,
http://localhost:8983/mysearch
searching also working fine.
But, these are not run through my custom handler. So i felt, it wrongly 
doing searching.

Because, in solr admin statistics page,
my custom handler under QueryHandler's request count remains 0, it 
doesn't get incremented, when i search something. Rather, 
statndardReqHandler's request count is incremented.


And another thing, how do we debug solr. ???
Please anybody help me to solve this ...

Thanks in advance.

Noble Paul ??? ?? wrote:

is there any error on the console?

On Fri, Jun 12, 2009 at 4:26 PM, Noor wrote:
  

hi,
 i am new to apache solr.
I need to create a custom request handler class. So i create a new one and
changed the solr-config.xml file as,
 
  
  explicit
  tandem
  true
  
  

And in my java class, the code is,

public class MyCustomHandler extends RequestHandlerBase{
 public CoreContainer coreContainer;
 public void handleRequestBody(SolrQueryRequest request, SolrQueryResponse
response) throws Exception {
  SolrCore coreToRequest = coreContainer.getCore("core2");
  ModifiableSolrParams params = new ModifiableSolrParams();
  params.set("echoParams", "explicit");
  params.set("q", "text");
  params.set("debugQuery", "true");
request = new LocalSolrQueryRequest(coreToRequest, params);
// SolrRequestHandler reqHandler =
coreToRequest.getRequestHandler("/select");
  coreToRequest.execute(reqHandler, request, response);
  coreToRequest.close();
  request.close();
  }
 // the abstract methods - getDescription(), getSourceId(), getSource(),
getVersion() are //overrided... but these methods doesn't have any
implementations.
}


But, if i search any text in my webapp from browser, gots the HTTP 500
error.
i dont know how SolrContainer is intialized
Pls anyone give me the solution...

thanks and regards,
Mohamed






  




Re: Custom Request handler Error:

2009-06-12 Thread noor

Yes,

Nullpointer Exception. on the line

SolrCore coreToRequest = coreContainer.getCore("core2");


Noble Paul ??? ?? wrote:

is there any error on the console?

On Fri, Jun 12, 2009 at 4:26 PM, Noor wrote:
  

hi,
 i am new to apache solr.
I need to create a custom request handler class. So i create a new one and
changed the solr-config.xml file as,
 
  
  explicit
  tandem
  true
  
  

And in my java class, the code is,

public class MyCustomHandler extends RequestHandlerBase{
 public CoreContainer coreContainer;
 public void handleRequestBody(SolrQueryRequest request, SolrQueryResponse
response) throws Exception {
  SolrCore coreToRequest = coreContainer.getCore("core2");
  ModifiableSolrParams params = new ModifiableSolrParams();
  params.set("echoParams", "explicit");
  params.set("q", "text");
  params.set("debugQuery", "true");
request = new LocalSolrQueryRequest(coreToRequest, params);
// SolrRequestHandler reqHandler =
coreToRequest.getRequestHandler("/select");
  coreToRequest.execute(reqHandler, request, response);
  coreToRequest.close();
  request.close();
  }
 // the abstract methods - getDescription(), getSourceId(), getSource(),
getVersion() are //overrided... but these methods doesn't have any
implementations.
}


But, if i search any text in my webapp from browser, gots the HTTP 500
error.
i dont know how SolrContainer is intialized
Pls anyone give me the solution...

thanks and regards,
Mohamed






  




Custom Request handler Error:

2009-06-12 Thread Noor

hi,
 i am new to apache solr.
I need to create a custom request handler class. So i create a new one 
and changed the solr-config.xml file as,

  
   
   explicit
   tandem
   true
   
   

And in my java class, the code is,

public class MyCustomHandler extends RequestHandlerBase{
  public CoreContainer coreContainer;
  public void handleRequestBody(SolrQueryRequest request, 
SolrQueryResponse response) throws Exception {

   SolrCore coreToRequest = coreContainer.getCore("core2");
   ModifiableSolrParams params = new ModifiableSolrParams();
   params.set("echoParams", "explicit");
   params.set("q", "text");
   params.set("debugQuery", "true");
request = new LocalSolrQueryRequest(coreToRequest, params);
//  
   SolrRequestHandler reqHandler = 
coreToRequest.getRequestHandler("/select");

   coreToRequest.execute(reqHandler, request, response);
   coreToRequest.close();
   request.close();
   }
 // the abstract methods - getDescription(), getSourceId(), 
getSource(), getVersion() are //overrided... but these methods doesn't 
have any implementations.

}


But, if i search any text in my webapp from browser, gots the HTTP 500 
error.

i dont know how SolrContainer is intialized
Pls anyone give me the solution...

thanks and regards,
Mohamed