LuceneObject o  LuceneSerializer serializer
src/main/java/gov/nysenate/openleg/lucene/DocumentBuilder.java
if(o == null) {
			return null;
Document buildDocument(LuceneObject o, LuceneSerializer serializer)
String[] args
src/main/java/gov/nysenate/openleg/search/Result.java
System.out.println(XStreamBuilder.writeResponse("xml", new SearchEngine2().get("xml", "bill", "s1234-2009", null, 0, 1, true)));
void main(String[] args)
Bill bill  BillEvent billEvent  StringBuilder searchContent  HashMap<String String> fields
src/main/java/gov/nysenate/openleg/search/SearchEngine.java
fields.put("when", billEvent.getEventDate().getTime()+"");
		fields.put("billno", billEvent.getBillId() );
		
		searchContent.append(billEvent.getBillId()).append(" ");
		
		try
		{
			if (bill.getSponsor()!=null) {
    			searchContent.append(bill.getSponsor().getFullname()).append(" ");
    			fields.put("sponsor", bill.getSponsor().getFullname());
void indexBillEvent (Bill bill, BillEvent billEvent, StringBuilder searchContent, HashMap<String,String> fields)
obj instanceof Supplemental
src/main/java/gov/nysenate/openleg/search/SearchEngine.java
Supplemental supp = (Supplemental)obj;
    		Calendar calendar = supp.getCalendar();
    		type = "calendar";
    		id = calendar.getId();
    		fields.put("ctype",calendar.getType());
    		
    		
    		if (supp.getCalendarDate()!=null)
    			fields.put("when", supp.getCalendarDate().getTime()+"");
    		
    		title = calendar.getNo() + " - " + calendar.getType();
    		
    		if (supp.getCalendarDate()!=null)
    			title += " - " + DATE_FORMAT_MEDIUM.format(supp.getCalendarDate());
    		
    		
    		else if (supp.getReleaseDateTime()!=null)
    		{
    			title += " - " + DATE_FORMAT_MEDIUM.format(supp.getCalendarDate());
else if (obj instanceof Supplemental)
obj instanceof Agenda
src/main/java/gov/nysenate/openleg/search/SearchEngine.java
Agenda agenda = (Agenda)obj;

    		if (agenda.getAddendums() != null) {
	    		Iterator<Addendum> itAnd = agenda.getAddendums().iterator();
	    		
	    		while (itAnd.hasNext()) {
	    			Iterator<Meeting> itMeetings = itAnd.next().getMeetings().iterator();
	    			while (itMeetings.hasNext()) {
	    				indexSenateObject (itMeetings.next(), indexWriter, pm);
else if (obj instanceof Agenda)
obj instanceof Meeting
src/main/java/gov/nysenate/openleg/search/SearchEngine.java
Meeting meeting = (Meeting)obj;
    		type = "meeting";
    		id = meeting.getId();
    		
    		searchContent.append(meeting.getCommitteeName()).append(" - ");
    		searchContent.append(meeting.getCommitteeChair()).append(" - ");
    		searchContent.append(meeting.getLocation()).append(" - ");
    		searchContent.append(meeting.getNotes());
    		
    		fields.put("committee",meeting.getCommitteeName());
    		fields.put("chair",meeting.getCommitteeChair());
    		fields.put("location",meeting.getLocation());
    		fields.put("notes", meeting.getNotes());
    		fields.put("when", meeting.getMeetingDateTime().getTime() + "");
    		
    		DateFormat df = java.text.DateFormat.getDateTimeInstance(DateFormat.MEDIUM, DateFormat.SHORT);
    		
    		title = meeting.getCommitteeName() + " - " + df.format(meeting.getMeetingDateTime());
    		summary =  meeting.getLocation();
else if (obj instanceof Meeting)
obj instanceof Transcript
src/main/java/gov/nysenate/openleg/search/SearchEngine.java
Transcript transcript = (Transcript)obj;
    		type = "transcript";
    		id = transcript.getId();
    		
    		searchContent.append(transcript.getTranscriptText());
    		
    		fields.put("full", transcript.getTranscriptText());
    		
    		if (transcript.getTimeStamp()!=null)
    			fields.put("when",transcript.getTimeStamp().getTime()+"");
    		else
    			fields.put("when","");
    		
    		fields.put("location",transcript.getLocation());
    		fields.put("session-type",transcript.getType());
    	
    		DateFormat df = java.text.DateFormat.getDateTimeInstance(DateFormat.MEDIUM, DateFormat.SHORT);

    		title = transcript.getType();
    		
    		if (transcript.getTimeStamp()!=null)
    			title += " - " + df.format(transcript.getTimeStamp());
    		
    		summary = transcript.getLocation();
else if (obj instanceof Transcript)
obj instanceof Vote
src/main/java/gov/nysenate/openleg/search/SearchEngine.java
Vote vote = (Vote)obj;
    		type = "vote";
    		id = vote.getId();
    		
    		Bill bill = vote.getBill();
    		
    		title = bill.getSenateBillNo() + " - " + DATE_FORMAT_MEDIUM.format(vote.getVoteDate());
    		
    		searchContent.append(bill.getSenateBillNo());
    		searchContent.append(" ");
    		
    		fields.put("billno", bill.getSenateBillNo());
    		
    		switch(vote.getVoteType()) {
    			case Vote.VOTE_TYPE_COMMITTEE:
    				
    				title += " - Committee Vote";
    				
    				if (vote.getDescription()!=null)
    					fields.put("committee", vote.getDescription());
    				else
    					fields.put("committee", bill.getCurrentCommittee());
    				
    				searchContent.append(" Committee Vote ");
    				searchContent.append(bill.getCurrentCommittee());
    				break;
    			case Vote.VOTE_TYPE_FLOOR:
    				title += " - Floor Vote";
    				searchContent.append(" Floor Vote ");
    				break;
else if (obj instanceof Vote)
obj instanceof BillEvent
src/main/java/gov/nysenate/openleg/search/SearchEngine.java
BillEvent billEvent = (BillEvent)obj;
    		type = "action";
    		id = billEvent.getBillEventId();
    		title = billEvent.getEventText();
    		summary = DATE_FORMAT_MEDIUM.format(billEvent.getEventDate());

    		Bill bill = PMF.getBill(pm,billEvent.getBillId());
    		
    		if (bill.getTitle()!=null) {
    			summary += " - " + bill.getTitle();
else if (obj instanceof BillEvent)