Examples of FieldSelector


Examples of org.apache.lucene.document.FieldSelector

//        return resource;
//    }

    public SurfaceForm getSurfaceForm(int docNo) throws SearchException {
        String[] onlyUriAndTypes = {LuceneManager.DBpediaResourceField.SURFACE_FORM.toString()};
        FieldSelector fieldSelector = new MapFieldSelector(onlyUriAndTypes);
        Document document = getDocument(docNo,fieldSelector);
        Field sfField = document.getField(LuceneManager.DBpediaResourceField.SURFACE_FORM.toString());
        if (sfField==null)
            throw new SearchException("Cannot find SurfaceForm for document "+document);
View Full Code Here

Examples of org.apache.lucene.document.FieldSelector

     * @param res
     * @return
     * @throws SearchException
     */
    public int getSupport(DBpediaResource res) throws SearchException {
        FieldSelector fieldSelector = new MapFieldSelector(uriAndCount);
        int support = 0;

        //if (res.support()>0) return res.support(); //TODO what happens if value is already set?

        List<Document> uris = getDocuments(res, fieldSelector);
View Full Code Here

Examples of org.skyscreamer.yoga.selector.FieldSelector

*/
public abstract class ParentheticalSelectorParser extends SelectorParser
{
    protected FieldSelector parseParentheticalSelector( String rawSelectorExpression, String openParenthesis ) throws ParseSelectorException
    {
        FieldSelector selector = new FieldSelector();
        StringBuilder stringBuilder = new StringBuilder( rawSelectorExpression );
        while (stringBuilder.length() > 0)
        {
            processNextSelectorField( selector, stringBuilder, openParenthesis );
        }
View Full Code Here

Examples of uk.ac.ucl.panda.utility.structure.FieldSelector

   * Constructor for DocNameExtractor.
   * @param docNameField name of the stored field containing the doc name.
   */
  public DocNameExtractor (final String docNameField) {
    this.docNameField = docNameField;
    fldSel = new FieldSelector() {
      public FieldSelectorResult accept(String fieldName) {
        return fieldName.equals(docNameField) ?
            FieldSelectorResult.LOAD_AND_BREAK :
              FieldSelectorResult.NO_LOAD;
      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.