Package org.apache.lucene.search.similar

Examples of org.apache.lucene.search.similar.MoreLikeThisQuery


                }
            }
    }
   
   
    MoreLikeThisQuery mlt=new MoreLikeThisQuery(DOMUtils.getText(e),fields,analyzer);
    mlt.setMaxQueryTerms(DOMUtils.getAttribute(e,"maxQueryTerms",defaultMaxQueryTerms));
    mlt.setMinTermFrequency(DOMUtils.getAttribute(e,"minTermFrequency",defaultMinTermFrequency));
    mlt.setPercentTermsToMatch(DOMUtils.getAttribute(e,"percentTermsToMatch",defaultPercentTermsToMatch)/100);
    mlt.setStopWords(stopWordsSet);
    int minDocFreq=DOMUtils.getAttribute(e,"minDocFreq",-1);
    if(minDocFreq>=0)
    {
      mlt.setMinDocFreq(minDocFreq);
    }

    mlt.setBoost(DOMUtils.getAttribute(e,"boost",1.0f));

    return mlt;
  }
View Full Code Here


                }
            }
    }
   
   
    MoreLikeThisQuery mlt=new MoreLikeThisQuery(DOMUtils.getText(e),fields,analyzer);
    mlt.setMaxQueryTerms(DOMUtils.getAttribute(e,"maxQueryTerms",defaultMaxQueryTerms));
    mlt.setMinTermFrequency(DOMUtils.getAttribute(e,"minTermFrequency",defaultMinTermFrequency));
    mlt.setPercentTermsToMatch(DOMUtils.getAttribute(e,"percentTermsToMatch",defaultPercentTermsToMatch)/100);
    mlt.setStopWords(stopWordsSet);
    int minDocFreq=DOMUtils.getAttribute(e,"minDocFreq",-1);
    if(minDocFreq>=0)
    {
      mlt.setMinDocFreq(minDocFreq);
    }

    mlt.setBoost(DOMUtils.getAttribute(e,"boost",1.0f));

    return mlt;
  }
View Full Code Here

                }
            }
    }
   
   
    MoreLikeThisQuery mlt=new MoreLikeThisQuery(DOMUtils.getText(e),fields,analyzer, fields[0]);
    mlt.setMaxQueryTerms(DOMUtils.getAttribute(e,"maxQueryTerms",defaultMaxQueryTerms));
    mlt.setMinTermFrequency(DOMUtils.getAttribute(e,"minTermFrequency",defaultMinTermFrequency));
    mlt.setPercentTermsToMatch(DOMUtils.getAttribute(e,"percentTermsToMatch",defaultPercentTermsToMatch)/100);
    mlt.setStopWords(stopWordsSet);
    int minDocFreq=DOMUtils.getAttribute(e,"minDocFreq",-1);
    if(minDocFreq>=0)
    {
      mlt.setMinDocFreq(minDocFreq);
    }

    mlt.setBoost(DOMUtils.getAttribute(e,"boost",1.0f));

    return mlt;
  }
View Full Code Here

                }
            }
    }
   
   
    MoreLikeThisQuery mlt=new MoreLikeThisQuery(DOMUtils.getText(e),fields,analyzer);
    mlt.setMaxQueryTerms(DOMUtils.getAttribute(e,"maxQueryTerms",defaultMaxQueryTerms));
    mlt.setMinTermFrequency(DOMUtils.getAttribute(e,"minTermFrequency",defaultMinTermFrequency));
    mlt.setPercentTermsToMatch(DOMUtils.getAttribute(e,"percentTermsToMatch",defaultPercentTermsToMatch)/100);
    mlt.setStopWords(stopWordsSet);

    mlt.setBoost(DOMUtils.getAttribute(e,"boost",1.0f));

    return mlt;
  }
View Full Code Here

      //trim the fieldnames
      for (int i = 0; i < fields.length; i++) {
        fields[i]=fields[i].trim();
      }
    }
    MoreLikeThisQuery mlt=new MoreLikeThisQuery(DOMUtils.getText(e),fields,analyzer);
    mlt.setMaxQueryTerms(DOMUtils.getAttribute(e,"maxQueryTerms",defaultMaxQueryTerms));
    mlt.setMinTermFrequency(DOMUtils.getAttribute(e,"minTermFrequency",defaultMinTermFrequency));
    mlt.setPercentTermsToMatch(DOMUtils.getAttribute(e,"percentTermsToMatch",defaultPercentTermsToMatch)/100);

    mlt.setBoost(DOMUtils.getAttribute(e,"boost",1.0f));

    return mlt;
  }
View Full Code Here

                }
            }
    }
   
   
    MoreLikeThisQuery mlt=new MoreLikeThisQuery(DOMUtils.getText(e),fields,analyzer);
    mlt.setMaxQueryTerms(DOMUtils.getAttribute(e,"maxQueryTerms",defaultMaxQueryTerms));
    mlt.setMinTermFrequency(DOMUtils.getAttribute(e,"minTermFrequency",defaultMinTermFrequency));
    mlt.setPercentTermsToMatch(DOMUtils.getAttribute(e,"percentTermsToMatch",defaultPercentTermsToMatch)/100);
    mlt.setStopWords(stopWordsSet);
    int minDocFreq=DOMUtils.getAttribute(e,"minDocFreq",-1);
    if(minDocFreq>=0)
    {
      mlt.setMinDocFreq(minDocFreq);
    }

    mlt.setBoost(DOMUtils.getAttribute(e,"boost",1.0f));

    return mlt;
  }
View Full Code Here

                }
            }
    }
   
   
    MoreLikeThisQuery mlt=new MoreLikeThisQuery(DOMUtils.getText(e),fields,analyzer);
    mlt.setMaxQueryTerms(DOMUtils.getAttribute(e,"maxQueryTerms",defaultMaxQueryTerms));
    mlt.setMinTermFrequency(DOMUtils.getAttribute(e,"minTermFrequency",defaultMinTermFrequency));
    mlt.setPercentTermsToMatch(DOMUtils.getAttribute(e,"percentTermsToMatch",defaultPercentTermsToMatch)/100);
    mlt.setStopWords(stopWordsSet);
    int minDocFreq=DOMUtils.getAttribute(e,"minDocFreq",-1);
    if(minDocFreq>=0)
    {
      mlt.setMinDocFreq(minDocFreq);
    }

    mlt.setBoost(DOMUtils.getAttribute(e,"boost",1.0f));

    return mlt;
  }
View Full Code Here

                }
            }
    }
   
   
    MoreLikeThisQuery mlt=new MoreLikeThisQuery(DOMUtils.getText(e),fields,analyzer);
    mlt.setMaxQueryTerms(DOMUtils.getAttribute(e,"maxQueryTerms",defaultMaxQueryTerms));
    mlt.setMinTermFrequency(DOMUtils.getAttribute(e,"minTermFrequency",defaultMinTermFrequency));
    mlt.setPercentTermsToMatch(DOMUtils.getAttribute(e,"percentTermsToMatch",defaultPercentTermsToMatch)/100);
    mlt.setStopWords(stopWordsSet);
    int minDocFreq=DOMUtils.getAttribute(e,"minDocFreq",-1);
    if(minDocFreq>=0)
    {
      mlt.setMinDocFreq(minDocFreq);
    }

    mlt.setBoost(DOMUtils.getAttribute(e,"boost",1.0f));

    return mlt;
  }
View Full Code Here

                }
            }
    }
   
   
    MoreLikeThisQuery mlt=new MoreLikeThisQuery(DOMUtils.getText(e),fields,analyzer);
    mlt.setMaxQueryTerms(DOMUtils.getAttribute(e,"maxQueryTerms",defaultMaxQueryTerms));
    mlt.setMinTermFrequency(DOMUtils.getAttribute(e,"minTermFrequency",defaultMinTermFrequency));
    mlt.setPercentTermsToMatch(DOMUtils.getAttribute(e,"percentTermsToMatch",defaultPercentTermsToMatch)/100);
    mlt.setStopWords(stopWordsSet);
    int minDocFreq=DOMUtils.getAttribute(e,"minDocFreq",-1);
    if(minDocFreq>=0)
    {
      mlt.setMinDocFreq(minDocFreq);
    }

    mlt.setBoost(DOMUtils.getAttribute(e,"boost",1.0f));

    return mlt;
  }
View Full Code Here

TOP

Related Classes of org.apache.lucene.search.similar.MoreLikeThisQuery

Copyright © 2018 www.massapicom. 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.