[Dspace-tech] Discover search update issue

2014-04-21 Thread Bhavesh Patel
Dear Tech Team,

We are facing one issue on Discover search

We have made one mistake while entering the author name

Into some entry we have added Patel, Bhavesh and some entry Patel,Bhavesh R
It will show like :
Discover
--
Patel, Bhavesh (10)
Patel, Bhavesh R (5)

So We have to convert into one authour Patel, Bhavesh

I have made changes into database
Table : metadatavalue
Field : textvalue

I have search Patel, Bhavesh R and converted into Patel, Bhavesh

and then update index.. but still it's shows the old value.. but into that
Item page it's show updated authour name

What may be the issue ?

Version : DSpace 4.1  OS : Window 7


Thanks  Regards,
*Bhavesh R. Patel *

   - www.bhaveshpatel.info
   - www.onlinequizportal.com
   - www.hindisuvichar.com

Never leave till tomorrow which you can do today
*Please consider the environment before printing this e-mail.*
--
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform___
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech
List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette

Re: [Dspace-tech] Update epersonid field in SOLR statistics

2014-04-21 Thread Terry Brady
Ivan and Hardy, thanks for the advice.

I took a different approach today, and tried to code a solution in java.
 This code appears to do what I need on my test server.  Given that these
are statistics records and the structure is fairly simple, this might do
what I need.

The stats records did not seem to have a unique id, so I believe that I
will need to delete them via a query.

The count limits in this code are tuned to the number of authentication
records that I would like to cleanup.

If anyone has a suggestion for improving this process, please let me know
your suggestion.

Thanks, Terry

public class SolrUpdate {

public static void main(String[] args) {
String url = http://localhost/solr/statistics;;
try {
String myQuery = epersonid:[1 TO *];
 if (args.length  0) myQuery= epersonid: + args[0];
 HttpSolrServer server = new HttpSolrServer( url );
 //server.setRequestWriter(new BinaryRequestWriter());
SolrQuery sq = new SolrQuery();
sq.setQuery(myQuery);
sq.setRows(20);
XMLResponseParser xrp = new XMLResponseParser();// {
// public String getContentType() {return text/xml;}
//};
server.setParser(xrp);
QueryResponse resp  = server.query(sq);
SolrDocumentList list = resp.getResults();
System.err.println(list.getNumFound() +  /  + list.size());
ArrayListSolrInputDocument idocs = new ArrayListSolrInputDocument();
if (list.size() == 0) {
System.err.println(No items for query);
return;
}
for(int i=0; ilist.size(); i++) {
System.err.println(i);
SolrDocument doc = list.get(i);
doc.setField(epersonid, 0);
SolrInputDocument idoc = new
SolrInputDocument(ClientUtils.toSolrInputDocument(doc));
//System.err.println(idoc.toString());
idocs.add(idoc);
}
server.deleteByQuery(myQuery);
server.add(idocs);
server.commit();
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}

}

}





On Fri, Apr 18, 2014 at 9:00 AM, Pottinger, Hardy J. 
pottinge...@missouri.edu wrote:

  Hi, I did some searching just now, and found this...

  http://wiki.apache.org/solr/UpdateCSV

  ...might help?

 --Hardy

  Sent from my iPad

 On Apr 17, 2014, at 3:53 PM, Terry Brady tw...@georgetown.edu wrote:

   We would like to make our usage statistics anonymous.

  I would like to update all statistics records with an epersonid value.

- q=epersonid:[0 TO *]

 Once the records are found, I would like to set the epersonid to 0.

  Is there a way to do this with a single curl statement?

  We are running DSpace 3.1.

  If not, could someone suggest a good approach to accomplish this task?

  Thanks, Terry

  --
 Terry Brady
 Applications Programmer Analyst
 Georgetown University Library Information Technology
 https://www.library.georgetown.edu/lit/code
  202-687-7053


 --
 Learn Graph Databases - Download FREE O'Reilly Book
 Graph Databases is the definitive new guide to graph databases and their
 applications. Written by three acclaimed leaders in the field,
 this first edition is now available. Download your free book today!
 http://p.sf.net/sfu/NeoTech

  ___
 DSpace-tech mailing list
 DSpace-tech@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/dspace-tech
 List Etiquette:
 https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette




-- 
Terry Brady
Applications Programmer Analyst
Georgetown University Library Information Technology
https://www.library.georgetown.edu/lit/code
202-687-7053
--
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform___
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech
List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette