Customizing Search Module in DSpace

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Customizing Search Module in DSpace

Masha Watts

Dear All,

I'm new to DSpace and I have a requirement of record and display zero search results. Eg:- If you search items by "Test", if the search result is zero, I have to record it and should be able to generate a report.

Any possibility of doing that with configurations or is there any one developed such kind of a module? Please Help.

Best Regards,

Masha


------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
DSpace-tech mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dspace-tech
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Customizing Search Module in DSpace

peterdietz
Hi Masha,

Here's one way to find where in the code this happens.

Search for your fake string, and find the exact string it says for no search results.

"Search produced no results."

Look for this string in the code.

<message key="xmlui.ArtifactBrowser.AbstractSearch.no_results">Search produced no results.</message>

Then look for usages of xmlui.ArtifactBrowser.AbstractSearch.no_results in the code. 
    private static final Message T_no_results =
        message("xmlui.ArtifactBrowser.AbstractSearch.no_results");

Then, find usages of T_no_results in that class. 
            else
            {
                results.addPara(T_no_results);
            }

You then have your entry point where you have a chance to do an action where there are no results. For starters, you can write a message to log.info.



Peter Dietz



On Mon, Feb 13, 2012 at 2:42 AM, Masha Watts <[hidden email]> wrote:

Dear All,

I'm new to DSpace and I have a requirement of record and display zero search results. Eg:- If you search items by "Test", if the search result is zero, I have to record it and should be able to generate a report.

Any possibility of doing that with configurations or is there any one developed such kind of a module? Please Help.

Best Regards,

Masha


------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
DSpace-tech mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dspace-tech



------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
DSpace-tech mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dspace-tech
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Customizing Search Module in DSpace

Masha Watts
Hi Peter,

Sorry I forgot to mention, I'm using JSPUI. I think the way it works is different in JSPUI. Any Idea?

Also I need to record no result searches in the database for reporting purposes.

Masha

On Tue, Feb 14, 2012 at 1:54 AM, Peter Dietz <[hidden email]> wrote:
Hi Masha,

Here's one way to find where in the code this happens.

Search for your fake string, and find the exact string it says for no search results.

"Search produced no results."

Look for this string in the code.

<message key="xmlui.ArtifactBrowser.AbstractSearch.no_results">Search produced no results.</message>

Then look for usages of xmlui.ArtifactBrowser.AbstractSearch.no_results in the code. 
    private static final Message T_no_results =
        message("xmlui.ArtifactBrowser.AbstractSearch.no_results");

Then, find usages of T_no_results in that class. 
            else
            {
                results.addPara(T_no_results);
            }

You then have your entry point where you have a chance to do an action where there are no results. For starters, you can write a message to log.info.



Peter Dietz



On Mon, Feb 13, 2012 at 2:42 AM, Masha Watts <[hidden email]> wrote:

Dear All,

I'm new to DSpace and I have a requirement of record and display zero search results. Eg:- If you search items by "Test", if the search result is zero, I have to record it and should be able to generate a report.

Any possibility of doing that with configurations or is there any one developed such kind of a module? Please Help.

Best Regards,

Masha


------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
DSpace-tech mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dspace-tech




------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
DSpace-tech mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dspace-tech
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Customizing Search Module in DSpace

peterdietz
Hi Masha, 

For JSPUI, you can follow the same process I showed you. Do a string search over the DSpace code-base, for each piece that your looking for, and look for where the hit is used. It helps if you check out the DSpace code into an IDE such as Intellij, NetBeans, or Eclipse. Otherwise, if your on *nix, you can grep it, otherwise, just Google it.



To log all of these empty-queries to a database, well, you could do that. You'd need to make a new table, add a class to interact with that table, have some setters and getters. You could also build a reporting page to show your empty queries, or just manipulate this data raw from SQL.

I would probably just log that there was no results, fire a usage event, have Spring wire up a listener to that event, and perhaps log that event into something like Solr, or elastic search. Or, just write to the dspace.log, and build a cronjob that parses your dspace.log each night, and throws all the entries for "No search results for query: quijibo" into whatever datastore you want from there.




Peter Dietz



On Mon, Feb 13, 2012 at 11:10 PM, Masha Watts <[hidden email]> wrote:
Hi Peter,

Sorry I forgot to mention, I'm using JSPUI. I think the way it works is different in JSPUI. Any Idea?

Also I need to record no result searches in the database for reporting purposes.

Masha


On Tue, Feb 14, 2012 at 1:54 AM, Peter Dietz <[hidden email]> wrote:
Hi Masha,

Here's one way to find where in the code this happens.

Search for your fake string, and find the exact string it says for no search results.

"Search produced no results."

Look for this string in the code.

<message key="xmlui.ArtifactBrowser.AbstractSearch.no_results">Search produced no results.</message>

Then look for usages of xmlui.ArtifactBrowser.AbstractSearch.no_results in the code. 
    private static final Message T_no_results =
        message("xmlui.ArtifactBrowser.AbstractSearch.no_results");

Then, find usages of T_no_results in that class. 
            else
            {
                results.addPara(T_no_results);
            }

You then have your entry point where you have a chance to do an action where there are no results. For starters, you can write a message to log.info.



Peter Dietz



On Mon, Feb 13, 2012 at 2:42 AM, Masha Watts <[hidden email]> wrote:

Dear All,

I'm new to DSpace and I have a requirement of record and display zero search results. Eg:- If you search items by "Test", if the search result is zero, I have to record it and should be able to generate a report.

Any possibility of doing that with configurations or is there any one developed such kind of a module? Please Help.

Best Regards,

Masha


------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
DSpace-tech mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dspace-tech





------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
DSpace-tech mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dspace-tech
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Customizing Search Module in DSpace

Masha Watts
Hi Peter,

I'm in the middle of developing this. It will be very helpful if you can provide me a sample code if available.

Thanks,
Masha

On Tue, Feb 14, 2012 at 10:27 PM, Peter Dietz <[hidden email]> wrote:
Hi Masha, 

For JSPUI, you can follow the same process I showed you. Do a string search over the DSpace code-base, for each piece that your looking for, and look for where the hit is used. It helps if you check out the DSpace code into an IDE such as Intellij, NetBeans, or Eclipse. Otherwise, if your on *nix, you can grep it, otherwise, just Google it.



To log all of these empty-queries to a database, well, you could do that. You'd need to make a new table, add a class to interact with that table, have some setters and getters. You could also build a reporting page to show your empty queries, or just manipulate this data raw from SQL.

I would probably just log that there was no results, fire a usage event, have Spring wire up a listener to that event, and perhaps log that event into something like Solr, or elastic search. Or, just write to the dspace.log, and build a cronjob that parses your dspace.log each night, and throws all the entries for "No search results for query: quijibo" into whatever datastore you want from there.




Peter Dietz




On Mon, Feb 13, 2012 at 11:10 PM, Masha Watts <[hidden email]> wrote:
Hi Peter,

Sorry I forgot to mention, I'm using JSPUI. I think the way it works is different in JSPUI. Any Idea?

Also I need to record no result searches in the database for reporting purposes.

Masha


On Tue, Feb 14, 2012 at 1:54 AM, Peter Dietz <[hidden email]> wrote:
Hi Masha,

Here's one way to find where in the code this happens.

Search for your fake string, and find the exact string it says for no search results.

"Search produced no results."

Look for this string in the code.

<message key="xmlui.ArtifactBrowser.AbstractSearch.no_results">Search produced no results.</message>

Then look for usages of xmlui.ArtifactBrowser.AbstractSearch.no_results in the code. 
    private static final Message T_no_results =
        message("xmlui.ArtifactBrowser.AbstractSearch.no_results");

Then, find usages of T_no_results in that class. 
            else
            {
                results.addPara(T_no_results);
            }

You then have your entry point where you have a chance to do an action where there are no results. For starters, you can write a message to log.info.



Peter Dietz



On Mon, Feb 13, 2012 at 2:42 AM, Masha Watts <[hidden email]> wrote:

Dear All,

I'm new to DSpace and I have a requirement of record and display zero search results. Eg:- If you search items by "Test", if the search result is zero, I have to record it and should be able to generate a report.

Any possibility of doing that with configurations or is there any one developed such kind of a module? Please Help.

Best Regards,

Masha


------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
DSpace-tech mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dspace-tech






------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
DSpace-tech mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dspace-tech
Loading...