Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Couple changes with the Test person

  • Loading branch information...
commit 01894e18c8a5498e6d2672fb81ad9dd0c011ab5f 1 parent c0aa991
@chrim chrim authored
Showing with 4 additions and 13 deletions.
  1. +4 −13 src/main/java/gov/nysenate/opendirectory/ldap/Test.java
View
17 src/main/java/gov/nysenate/opendirectory/ldap/Test.java
@@ -41,8 +41,8 @@ public static void main(String[] args) throws NamingException {
localserver = new CommonsHttpSolrServer("http://localhost:8080/solr/");
SolrServer server = localserver;
-
- /*Person test_p = new Person();
+
+ Person test_p = new Person();
test_p.setEmail("test_email@chrim.com");
test_p.setFirstName("test");
@@ -53,26 +53,17 @@ public static void main(String[] args) throws NamingException {
test_p.setPhone("123-333-1111");
test_p.setState("NY");
test_p.setTitle("Manager");
- test_p.setUid("123");
+ test_p.setUid("1");
server.addBean(test_p);
server.commit();
- */
+
SolrQuery query = new SolrQuery();
query.setQuery("*:*");
QueryResponse rsp = server.query(query);
-
- /*SolrDocumentList docs = rsp.getResults();
- while(docs.get(3).iterator().hasNext())
- {
- docs.get(3).iterator().
- }
- System.out.println(docs.get(3).size());
- */
-
ArrayList<Person> beans = (ArrayList<Person>)rsp.getBeans(Person.class);
for(Person p : beans) {
Please sign in to comment.
Something went wrong with that request. Please try again.