lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Girish Pandit <pandit.gir...@gmail.com>
Subject "SELECT" on a Rich Document to download/display content
Date Mon, 26 Jul 2010 04:10:49 GMT
Hi,

I indexed a word document, when I do select, it shows the file name. How 
can I display content? also if I add "hl=true", is this going to show me 
the line with the highlight from the word document?

I am using below URL to do select:

http://localhost:8983/solr/select/?q=Management

it shows Response like below:
<response>
<lst name="responseHeader"><int name="status">0</int><int 
name="QTime">1</int><lst name="params"><str 
name="q">Management</str></lst></lst><result name="response" 
numFound="1" start="0"><doc><str name="id">Mgmt.doc</str></doc></result>
</response>

Indexing was done with below Java code:

    public void SolrCellRequestDemo() throws IOException, 
SolrServerException {
            SolrServer server = new 
CommonsHttpSolrServer("http://localhost:8983/solr");
            ContentStreamUpdateRequest req = new 
ContentStreamUpdateRequest("/update/extract");
            req.addFile(new File("/Users/Girish/Development/Web 
Server/apache-solr-1.4.1/example/exampledocs/Mgmt.doc"));
            req.setAction(AbstractUpdateRequest.ACTION.COMMIT, true, true);
            req.setParam("literal.id", "Mgmt.doc");
            NamedList<Object> result = server.request(req);
            System.out.println("Result: " + result);
           
        }


Mime
View raw message