Help on introducing new field in carrot2 search page

classic Classic list List threaded Threaded
15 messages Options
Reply | Threaded
Open this post in threaded view
|

Help on introducing new field in carrot2 search page

Ezhil

Hi,

I would like to express my sincere thanks to group for your proactive support always.

I have integrated Solr with Carrot2 and able to get search results.

To get user based search results, invoked ACL service from Carrot2.
 - From RemoteXmlSimpleSearchEngineBase->fetchSearchResponse(), invoked web service component with search result URLs and userid (hardcoded)
 - ACL service returns authenticated urls for the userid
 - Filtered documents based on the ACL authenticaed
 - Filtered documents added to response (response.results.addAll(filteredDocs)

I need a help here, I would like to pass userid through request param or i need to introduce new field in Carrot2 search page.

Please give me directions to achieve the same.

Thanks for your support always.

Thanks and Regards,
Ezhilmuthu, T


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Carrot2-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/carrot2-developers
Reply | Threaded
Open this post in threaded view
|

Re: Help on introducing new field in carrot2 search page

Stanislaw Osinski
Administrator
Hi,

 - From RemoteXmlSimpleSearchEngineBase->fetchSearchResponse(), invoked web service component with search result URLs and userid (hardcoded)
 - ACL service returns authenticated urls for the userid
 - Filtered documents based on the ACL authenticaed
 - Filtered documents added to response (response.results.addAll(filteredDocs)

I need a help here, I would like to pass userid through request param or i need to introduce new field in Carrot2 search page.


1. To your document source class, add an attribute representing userid, e.g.

@Input
@Processing
@Attribute(key = "userId")
@Internal
String userId;

(see http://fisheye3.atlassian.com/browse/carrot2/trunk/applications/carrot2-examples/src/org/carrot2/examples/source/ExampleDocumentSource.java?r=trunk for a working example of attributes in a document source)

2. In the doGet() method of QueryProcessorServlet, pass your userid:

        // Unpack parameters from string arrays

final Map<String, Object> requestParameters = MapUtils.unpack(request

.getParameterMap());
requestParameters.put("userId", userId /* from cookie, from request, etc */);
Cheers,

S.

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Carrot2-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/carrot2-developers
Reply | Threaded
Open this post in threaded view
|

stupid question (installation)

markr
Running CentOS 5.3. I unzip the release, and fire it up from the command
line. I've got DISPLAY exported.

What I see is that the command line is running, so I bg it. I don't see
a window, nor do I have any idea how to connect to it. Eventually I see
a bunch of Pango-CRITICAL, then gtk-CRITICAL, if segv's, and dies.

We've got selinux, but it's in permissive mode, and I don't see any alerts.

So, how do we start it correctly? Is there some configuration that needs
doing?

         mark

------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
Carrot2-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/carrot2-developers
Reply | Threaded
Open this post in threaded view
|

Re: stupid question (installation)

Stanislaw Osinski
Administrator
Hi Mark,

Running CentOS 5.3. I unzip the release, and fire it up from the command
line. I've got DISPLAY exported.

Which application do you mean? (or: which ZIP file did you download)

Thanks,

S.

------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
Carrot2-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/carrot2-developers
Reply | Threaded
Open this post in threaded view
|

Re: stupid question (installation)

markr
Stanislaw Osinski wrote:
> Hi Mark,
>
>     Running CentOS 5.3. I unzip the release, and fire it up from the command
>     line. I've got DISPLAY exported.
>
>
> Which application do you mean? (or: which ZIP file did you download)
>
carrot2-workbench-linux.gtk.x86_64-3.0.1.zip

Is there something else I need to install?

Ok, looking further down the d/l page, my developer wants to try this on
his data. Should I not hand him the workbench? Do we need the
tomcat-based webapp?

        mark

        mark

--
Mark Roth
Senior Systems Administrator
NIH Contractor (SRA)
[hidden email]
(301) 402-3206

------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
Carrot2-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/carrot2-developers
Reply | Threaded
Open this post in threaded view
|

Re: stupid question (installation)

Stanislaw Osinski
Administrator

carrot2-workbench-linux.gtk.x86_64-3.0.1.zip

Is there something else I need to install?

Workbench (which is a GUI application) is a bit tricky -- it's based on Eclipse RCP and it should run at least on the platforms they support (http://www.eclipse.org/projects/project-plan.php?projectid=eclipse#target_environments). Chances are, it will work on some other distributions, but this is the bit that is hardest to debug... (another thing to clarify in the documentation... :-)

One more thing to try is grabbing the not yet released 3.1 version from:

http://download.carrot2.org/head/

This one is built against a newer version of Eclipse RCP, so it's worth trying.

I'm assuming your installing the software either on the developer's desktop or he/she will be accessing the machine remotely? The workbench by its nature is designed for experimenting so a local install should do (easiest with Windows, of course...).
 
Ok, looking further down the d/l page, my developer wants to try this on
his data. Should I not hand him the workbench? Do we need the
tomcat-based webapp?

For initial experimenting, Workbench is the best choice (easy to tune parameters etc.). When it comes to the production use, depending on the integration and distribution strategy, the Document Clustering Server (run inside Tomcat or standalone) or the webapp seem more appropriate.

S.

------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
Carrot2-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/carrot2-developers
Reply | Threaded
Open this post in threaded view
|

Re: stupid question (installation)

markr
Stanislaw Osinski wrote:

>
>     carrot2-workbench-linux.gtk.x86_64-3.0.1.zip
>
>     Is there something else I need to install?
>
> Workbench (which is a GUI application) is a bit tricky -- it's based on
> Eclipse RCP and it should run at least on the platforms they support
> (http://www.eclipse.org/projects/project-plan.php?projectid=eclipse#target_environments).
> Chances are, it will work on some other distributions, but this is the
> bit that is hardest to debug... (another thing to clarify in the
> documentation... :-)

Does this mean I have to install eclipse?

>
> One more thing to try is grabbing the not yet released 3.1 version from:
>
> http://download.carrot2.org/head/
>
> This one is built against a newer version of Eclipse RCP, so it's worth
> trying.
>
> I'm assuming your installing the software either on the developer's
> desktop or he/she will be accessing the machine remotely? The workbench

Server. Dunno if it's the one that's under his desk, but....

> by its nature is designed for experimenting so a local install should do
> (easiest with Windows, of course...).

I. Don't. Do. Windows. I only do *Nix, a real o/s.... <g>
>
>     Ok, looking further down the d/l page, my developer wants to try this on
>     his data. Should I not hand him the workbench? Do we need the
>     tomcat-based webapp?
>
> For initial experimenting, Workbench is the best choice (easy to tune
> parameters etc.). When it comes to the production use, depending on the
> integration and distribution strategy, the Document Clustering Server
> (run inside Tomcat or standalone) or the webapp seem more appropriate.

Ok, so I installed the right package.... But please let me know if I
need eclipse; if so, what's the minimum release, or can I just grab
current stable?

        mark

------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
Carrot2-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/carrot2-developers
Reply | Threaded
Open this post in threaded view
|

Re: stupid question (installation)

Stanislaw Osinski
Administrator

Does this mean I have to install eclipse?

No, it's just using the same UI toolkit Eclipse is using. So if Eclipse can run, so should the workbench.

> I'm assuming your installing the software either on the developer's
> desktop or he/she will be accessing the machine remotely? The workbench

Server. Dunno if it's the one that's under his desk, but....

> by its nature is designed for experimenting so a local install should do
> (easiest with Windows, of course...).

I. Don't. Do. Windows. I only do *Nix, a real o/s.... <g>

:-)
 
>     Ok, looking further down the d/l page, my developer wants to try this on
>     his data. Should I not hand him the workbench? Do we need the
>     tomcat-based webapp?
>
> For initial experimenting, Workbench is the best choice (easy to tune
> parameters etc.). When it comes to the production use, depending on the
> integration and distribution strategy, the Document Clustering Server
> (run inside Tomcat or standalone) or the webapp seem more appropriate.

Ok, so I installed the right package.... But please let me know if I
need eclipse;

No Eclipse needed, everything is bundled in the workbench archive.

S.

------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
Carrot2-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/carrot2-developers
Reply | Threaded
Open this post in threaded view
|

Re: stupid question (installation)

markr
Stanislaw Osinski wrote:
>
>     Does this mean I have to install eclipse?
>
>
> No, it's just using the same UI toolkit Eclipse is using. So if Eclipse
> can run, so should the workbench.
<snip>
Will what I d/l work with openjdk, or does it absolutely have to have
the official Sun sdk? Could that be my problem?

        mark

------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
Carrot2-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/carrot2-developers
Reply | Threaded
Open this post in threaded view
|

Re: stupid question (installation)

Stanislaw Osinski
Administrator
> No, it's just using the same UI toolkit Eclipse is using. So if Eclipse
> can run, so should the workbench.
<snip>
Will what I d/l work with openjdk, or does it absolutely have to have
the official Sun sdk? Could that be my problem?

Apologies for the delay, I somehow overlooked your message in my inbox...

Anyway -- again looking at http://www.eclipse.org/projects/project-plan.php?projectid=eclipse#target_environments, they support Sun's and IBM's JDKs. If openjdk gives you errors, it may be worth checking with Sun JDK.

Cheers,

S.




------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
Carrot2-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/carrot2-developers
Reply | Threaded
Open this post in threaded view
|

Re: stupid question (installation)

markr
Stanislaw Osinski wrote:
>      > No, it's just using the same UI toolkit Eclipse is using. So if
>     Eclipse
>      > can run, so should the workbench.
>     <snip>
>     Will what I d/l work with openjdk, or does it absolutely have to have
>     the official Sun sdk? Could that be my problem?

> Apologies for the delay, I somehow overlooked your message in my inbox...
>
> Anyway -- again looking at
> http://www.eclipse.org/projects/project-plan.php?projectid=eclipse#target_environments,
> they support Sun's and IBM's JDKs. If openjdk gives you errors, it may
> be worth checking with Sun JDK.

Actually, I found /usr/sbin/alternatives, made a tweak or two, including
creating /usr/java/, and creating a symlink to the openjdk.

Then it was making sure he was doing ssh -X, and he found it needed to
hit a directory which he hadn't set the permissions to....

At any rate, he's up and running, and using 3.1. Thanks for all your help.

Developers, why did it have to be developers...? <g>

        mark, former developer

------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
Carrot2-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/carrot2-developers
Reply | Threaded
Open this post in threaded view
|

suggestion for packages

markr
In reply to this post by Stanislaw Osinski
Stanislaw,

    One suggestion: package each release under
carrot-workbench-<release.subrelease>. Then folks like me can just make
a symbolic link to the new package for carrot-workbench, and if there's
a show-stopper, change the link to point to the previous release, and
the user doesn't have to worry 'bout nothin'.

        mark

------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
Carrot2-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/carrot2-developers
Reply | Threaded
Open this post in threaded view
|

Re: stupid question (installation)

Stanislaw Osinski
Administrator
In reply to this post by markr

Actually, I found /usr/sbin/alternatives, made a tweak or two, including
creating /usr/java/, and creating a symlink to the openjdk.

Then it was making sure he was doing ssh -X, and he found it needed to
hit a directory which he hadn't set the permissions to....

At any rate, he's up and running, and using 3.1. Thanks for all your help.

Glad to hear it finally worked :-)

S.



------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
Carrot2-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/carrot2-developers
Reply | Threaded
Open this post in threaded view
|

Re: suggestion for packages

Stanislaw Osinski
Administrator
In reply to this post by markr

   One suggestion: package each release under
carrot-workbench-<release.subrelease>. Then folks like me can just make
a symbolic link to the new package for carrot-workbench, and if there's
a show-stopper, change the link to point to the previous release, and
the user doesn't have to worry 'bout nothin'.

That's a good idea, actually, thanks!

S.

------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
Carrot2-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/carrot2-developers
Reply | Threaded
Open this post in threaded view
|

Re: suggestion for packages

markr
Stanislaw Osinski wrote:
>
>        One suggestion: package each release under
>     carrot-workbench-<release.subrelease>. Then folks like me can just make
>     a symbolic link to the new package for carrot-workbench, and if there's
>     a show-stopper, change the link to point to the previous release, and
>     the user doesn't have to worry 'bout nothin'.
>
> That's a good idea, actually, thanks!

You're welcome. I do that a lot - new versions of apache, or firefox,
OpenOffice.org, or other software - that's what symlinks are perfect for.

        mark

------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
Carrot2-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/carrot2-developers