AnsweredAssumed Answered

Document Search Result Mismatch

Question asked by swemon on May 2, 2012
Latest reply on May 2, 2012 by andy
Dear all,

I want to use search service to retrieve documents in repository like alfresco search page.
like this
SearchParameters sp = new SearchParameters();
            sp.addStore(new StoreRef(REPOSITORY_STOREREF)); //"workspace://SpacesStore"
            String query = documentNameParam + " AND TYPE:\"content\""; // filename AND TYPE:"content"
            ResultSet resultSet = null;
               System.out.println("NodeRef meeting for search critria…: " + sp.getQuery());
               resultSet = searchService.query(sp);
                for(ResultSetRow row : resultSet)
                   System.out.println("NodeRef: " + row.getNodeRef());
                if(resultSet != null)

When I use same query, this code will not show any correct result but not always while searching with alfresco search page shows correct results.

Any ideas? Is there any restriction for document in search service???