Examples of Searchable


Examples of org.apache.lucene.search.Searchable

        // Process indexes into an array of Searchables.
        List searchableList = new ArrayList( indexes );
        CollectionUtils.transform( searchableList, searchableTransformer );

        Searchable searchables[] = new Searchable[searchableList.size()];
        searchableList.toArray( searchables );

        try
        {
            // Create a multi-searcher for looking up the information.
View Full Code Here

Examples of org.apache.lucene.search.Searchable

        // Process indexes into an array of Searchables.
        List searchableList = new ArrayList( indexes );
        CollectionUtils.transform( searchableList, searchableTransformer );

        Searchable searchables[] = new Searchable[searchableList.size()];
        searchableList.toArray( searchables );

        try
        {
            // Create a multi-searcher for looking up the information.
View Full Code Here

Examples of org.apache.lucene.search.Searchable

        // Process indexes into an array of Searchables.
        List searchableList = new ArrayList( indexes );
        CollectionUtils.transform( searchableList, searchableTransformer );

        Searchable searchables[] = new Searchable[searchableList.size()];
        searchableList.toArray( searchables );

        MultiSearcher searcher = null;

        try
View Full Code Here

Examples of org.apache.lucene.search.Searchable

          logger.debug("binding remote searchables");
          List<Volume> volumes = Config.getConfig().getVolumes().getVolumes();
          LinkedList<Searchable> searchers = new LinkedList<Searchable>();
          for (Volume v: volumes) {
            if (v.getAllowRemoteSearch() && !v.isRemote() && v.getStatus()==Volume.Status.CLOSED || v.getStatus()==Volume.Status.ACTIVE) {
              Searchable volsearcher = new IndexSearcher(v.getIndexPath());
                    try {
                      searchers.add(volsearcher);
                    } catch (Exception e) {
                      logger.error("failed to add searcher {"+v+"}: "+e.getMessage(),e);
                    }
View Full Code Here

Examples of org.jdesktop.swingx.search.Searchable

     * @param searchable Component where search widget will try to locate and select
     *                   information using methods of the {@link Searchable Searchable} interface.
     */
    public void setSearchable(Searchable searchable) {
        if ((this.searchable != null) && this.searchable.equals(searchable)) return;
        Searchable old = this.searchable;
        if (old != null) {
            old.search((Pattern) null);
        }
        this.searchable = searchable;
        getPatternModel().setFoundIndex(-1);
        firePropertyChange("searchable", old, this.searchable);
    }
View Full Code Here

Examples of org.jdesktop.swingx.search.Searchable

     * sets it as the current searchable of the search panel.
     *
     * @param searchableProvider a component which
     */
    protected void updateSearchPanel(Object searchableProvider) {
        final Searchable s = getSearchable(searchableProvider);
        SwingUtilities.invokeLater(new Runnable() {
            public void run() {
                searchPanel.setSearchable(s);
                KeyboardFocusManager.getCurrentKeyboardFocusManager()
                        .focusNextComponent(searchPanel);
View Full Code Here

Examples of org.jzkit.search.provider.iface.Searchable

    app_context = new ClassPathXmlApplicationContext( "TestApplicationContext.xml" );
    SearchableFactory sf = (org.jzkit.search.provider.iface.SearchableFactory) app_context.getBean("SearchableFactory");

    IRServiceDescriptor descriptor = new IRServiceDescriptor("proto=SOLR,code=k-int-solr,baseURL=http://dev.k-int.com:8080/solr/select,shortname=SOLR,longname=k-int SOLR Test,defaultRecordSyntax=usmarc,defaultElementSetName=F,recordArchetypes(Default)=solr::F,QueryType=SOLR-STD,fieldList(F)='id,name,popularity',fieldList(B)='id,name',fieldList(Default)='id,name,popularity'");

    Searchable s = sf.create(descriptor);

    if ( s != null ) {
      org.jzkit.search.util.QueryModel.CQLString.CQLString qm = new org.jzkit.search.util.QueryModel.CQLString.CQLString("name=dell");

      // Create a query
      IRQuery query = new IRQuery(qm,"Default");

      IRResultSet result = s.evaluate(query);
      result.waitForStatus(IRResultSetStatus.COMPLETE|IRResultSetStatus.FAILURE,0);
      Enumeration e = new org.jzkit.search.util.ResultSet.ReadAheadEnumeration(result, new ArchetypeRecordFormatSpecification("Default"));
      for ( int i=0; ( ( e.hasMoreElements() ) && ( i < 20 ) ); i++) {
        Object o = e.nextElement();
        System.err.println(o);
View Full Code Here

Examples of org.jzkit.search.provider.iface.Searchable

    Z3950QueryModel zqm = Type1QueryModelBuilder.buildFrom(app_context, query.query, "utf-8");
    System.err.println("result of conversion back :"+zqm.toInternalQueryModel(app_context));
   

    System.err.println("Obtain instance from factory");
    Searchable s = factory.newSearchable();
    s.setApplicationContext(app_context);

    System.err.println("Evaluate query...");
    IRResultSet result = s.evaluate(query);

    System.err.println("Waiting for result set to complete, current status = "+result.getStatus());
    // Wait without timeout until result set is complete or failure
    result.waitForStatus(IRResultSetStatus.COMPLETE|IRResultSetStatus.FAILURE,0);
View Full Code Here

Examples of org.opentides.bean.Searchable

    return countByExample(example,false);
  }
 
  public final long countByExample(T example, boolean exactMatch) {
    if (example instanceof Searchable) {
      Searchable criteria = (Searchable) example;
      String whereClause = CrudUtil.buildJpaQueryString(criteria, exactMatch);
      String filterClause = this.buildSecurityFilterClause(example);
      String append = appendClauseToExample(example, exactMatch);
      whereClause = doSQLAppend(whereClause, append);
      whereClause = doSQLAppend(whereClause, filterClause);
View Full Code Here

Examples of org.opentides.bean.Searchable

  }
 
  @SuppressWarnings("unchecked")
  public final List<T> findByExample(T example, boolean exactMatch, int start, int total) {
    if (example instanceof Searchable) {
      Searchable criteria = (Searchable) example;
      String whereClause = CrudUtil.buildJpaQueryString(criteria, exactMatch);
      String orderClause = " " + appendOrderToExample(example);
      String filterClause = this.buildSecurityFilterClause(example);
      String append = appendClauseToExample(example, exactMatch);
      whereClause = doSQLAppend(whereClause, append);
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.