cancel
Showing results for 
Search instead for 
Did you mean: 

Web script using SOLR API

mcasanket
Champ on-the-rise
Champ on-the-rise
Hi All!  Smiley Very Happy
   I have installed Alfresco 4.0 community version. I want to write a simple web script that gives me a list of users. I want to write this web script using SOLR JAVA API. Can anyone knows how to use SOLR JAVA API?

Please help me!

Thanking youSmiley Happy
6 REPLIES 6

jpfi
Champ in-the-making
Champ in-the-making
Hi,
is there a reason why you like to do this? I mean why don't you use Alfresco's JavaScript or JavaAPI? if you like to code in Java then just write a Java backed WebScript that calls personService.getAllPeople().

Calling Solr directly with SOLRJ is the same mistake as querying Alfresco's DB directly.
Cheers, Jan

mcasanket
Champ on-the-rise
Champ on-the-rise
Hi Jan,
   If I use personService.getPerson("abc.xyz") in web script then it will user SOLR API to get the results?
   I meant, my logs are active for SOLR. But when I when I call the above code nothing get printed related to SOLR…. I meant no SOLR query fired…

Plz help!

WebScript that calls personService.getAllPeople().
Cheers, Jan

thanking you!

mrogers
Star Contributor
Star Contributor
Some commands will use SOLR, some won't,  why would getAllPeople need to use SOLR?   In general the more complicated search methods will use lucene or solr.

mcasanket
Champ on-the-rise
Champ on-the-rise
Ohh is it… :!: 

  So it means if I write or use some old web script (before alfresco 4.0) then It will use solr api's automatically? I meant to say Do I need to rewrite web scripts using SOLR API's?
   The ServiceRegistry, NodeService and any other query fired on repository will automatically use SOLR ?

alfresco-global.properties
index.subsystem.name=solr 

Some commands will use SOLR, some won't,  why would getAllPeople need to use SOLR?   In general the more complicated search methods will use lucene or solr.


Please help!

jpfi
Champ in-the-making
Champ in-the-making
Hi,
No, you won't have to rewrite the code. Alfresco's searchService encapsulate the concrete search subsystem.
If you're using solr subsystem you'll only have in mind that that your data isn't sychronously indexed is it was mostly done via lucene before.
Best, jan

mcasanket
Champ on-the-rise
Champ on-the-rise
Hi Jan,
  Thanks for your reply!  Smiley Very Happy

  I want to know that as the data is asynchronously indexed, is there any way to see the log when it goes for indexing…!!!? As in my one post you suggest me to active log for SOLR and it helped me a lot… Is there any logging through which I can see that the data is being indexed now…

If you're using solr subsystem you'll only have in mind that that your data isn't sychronously indexed is it was mostly done via lucene before.



Thanking you!
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.