All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.mindoo.domino.jna.internal.FTSearchResultsDecoder Maven / Gradle / Ivy

The newest version!
package com.mindoo.domino.jna.internal;

import java.util.ArrayList;
import java.util.EnumSet;
import java.util.List;

import com.mindoo.domino.jna.NoteIdWithScore;
import com.mindoo.domino.jna.constants.FTSearch;
import com.sun.jna.Pointer;

public class FTSearchResultsDecoder {

	public static List decodeNoteIdsWithStoreSearchResult(Pointer ptr, 
			EnumSet searchOptions) {
		
		int numHits = ptr.getInt(0);
		ptr = ptr.share(4);
		
		short flags = ptr.getShort(0);
		ptr = ptr.share(2);

		if ((flags & NotesConstants.FT_RESULTS_EXPANDED) == NotesConstants.FT_RESULTS_EXPANDED) {
			throw new IllegalArgumentException("Domain searches are currently unsupported");
		}
		if ((flags & NotesConstants.FT_RESULTS_URL) == NotesConstants.FT_RESULTS_URL) {
			throw new IllegalArgumentException("FT results with URL are currently unsupported");
		}

		short varLength = ptr.getShort(0);
		ptr = ptr.share(2);
		
		List noteIds = new ArrayList();
		List scores = new ArrayList();
		
		for (int i=0; i noteIdsWithScore = new ArrayList();
		for (int i=0; i




© 2015 - 2024 Weber Informatics LLC | Privacy Policy