You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Jagdish Kumar <ja...@hotmail.com> on 2011/09/01 12:25:35 UTC

Solritas issue in opening files

Hi 
 
I have indexed some files from a directory and I can see them in results @ http://localhost:8080/solr/browse
I have also added a field "Location" which displays the file Location as Link :
 
Following changes I have done for Links stuff:
1. Added <field column="fileAbsolutePath" name="links"/> in data-config.xml for FileListEntityProcessor.
2.MetaData field <field name="links" type="string" indexed="true" stored="true" multiValued="true"/> is already there in schema.xml
3.I have updated doc.vm with : <div>Location: <a href="#field('links')&mlt=true">#field('links')</a></div>
 
It does shows a Location field in resultsas a hyperlink, but when I try and open file by clicking on the link, it fails to open the file from local.
 
It would be gr8 if someone can help me out with this issue.
 
Thanks and regards
Jagdish
  		 	   		  

Re: Solritas issue in opening files

Posted by "Balaji N.S. [via Lucene]" <ml...@n3.nabble.com>.
Hi 

To open files from local system use file protocol . (file:///<followed by
absolute path>)

If you are running the application in jboss instead of jetty you can deploy
the input files as a separate war which is exploded and then avoid using
file protocol.

File protocol is erroneous. It is not supported by reputed browser like
Firefox. 




______________________________________
If you reply to this email, your message will be added to the discussion below:
http://lucene.472066.n3.nabble.com/Solritas-issue-in-opening-files-tp3300836p3300867.html
This email was sent by Balaji N.S. (via Nabble)
To receive all replies by email, subscribe to this discussion: http://lucene.472066.n3.nabble.com/template/NamlServlet.jtp?macro=subscribe_by_code&node=3300836&code=c29sci11c2VyQGx1Y2VuZS5hcGFjaGUub3JnfDMzMDA4MzZ8MTIyNjQ0MTk0Mg==

RE: Solritas issue in opening files

Posted by "jagdish2011 [via Lucene]" <ml...@n3.nabble.com>.

Erik

I tried your solution.. but it still not open the files in solr results, I
am pasting my files.. take a look is somthing can be corrected :

data-config.xml:
<dataConfig>
    <dataSource type="BinFileDataSource" name="bin"/>
    <document>
        <entity name="f" processor="FileListEntityProcessor"
recursive="true" 
rootEntity="false" 
 dataSource="null"  baseDir="C:\solr-home\conf" 
fileName=".*\.(DOC)|(PDF)|(XML)|(xml)|(JPEG)|(jpeg)|(JPG)|(jpg)|(TXT)|(txt)|(ZIP)|(zip)|(pdf)|(doc)"
onError="skip">
            <entity name="tika-test" processor="TikaEntityProcessor" 
url="${f.fileAbsolutePath}" format="text" dataSource="bin" onError="skip"> 
                <field column="Author" name="author" meta="true"/> 
                <field column="title" name="title" meta="true"/> 
                <field column="text" name="text"/>
				<field column="file" name="fileName"/>
				<field column="artist" name="artist" meta="true"/>
				<field column="image_description" name="image_description" meta="true"/>
</entity>
 <field column="file" name="name"/>
 <field column="file" name="fileName"/>
 <field column="fileAbsolutePath" name="links"/>
</entity>
    </document>
</dataConfig>




Solrconfig.xml:
<requestHandler name="/admin/file" 
                     class="solr.admin.ShowFileRequestHandler" >
       <lst name="invariants">
         <str name="hidden">synonyms.txt</str> 
         <str name="hidden">anotherfile.txt</str> 
       </lst>
     </requestHandler>


Please suggest.
thanks 
Jagdish



_______________________________________________
If you reply to this email, your message will be added to the discussion below:
http://lucene.472066.n3.nabble.com/Solritas-issue-in-opening-files-tp3300836p3361588.html

To unsubscribe from Solritas issue in opening files, visit http://lucene.472066.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=3300836&code=c29sci11c2VyQGx1Y2VuZS5hcGFjaGUub3JnfDMzMDA4MzZ8MTIyNjQ0MTk0Mg==

RE: Solritas issue in opening files

Posted by jagdish2011 <ja...@hotmail.com>.
Erik

I tried your solution.. but it still not open the files in solr results, I
am pasting my files.. take a look is somthing can be corrected :

data-config.xml:
<dataConfig>
    <dataSource type="BinFileDataSource" name="bin"/>
    <document>
        <entity name="f" processor="FileListEntityProcessor"
recursive="true" 
rootEntity="false" 
 dataSource="null"  baseDir="C:\solr-home\conf" 
fileName=".*\.(DOC)|(PDF)|(XML)|(xml)|(JPEG)|(jpeg)|(JPG)|(jpg)|(TXT)|(txt)|(ZIP)|(zip)|(pdf)|(doc)"
onError="skip">
            <entity name="tika-test" processor="TikaEntityProcessor" 
url="${f.fileAbsolutePath}" format="text" dataSource="bin" onError="skip"> 
                <field column="Author" name="author" meta="true"/> 
                <field column="title" name="title" meta="true"/> 
                <field column="text" name="text"/>
				<field column="file" name="fileName"/>
				<field column="artist" name="artist" meta="true"/>
				<field column="image_description" name="image_description" meta="true"/>
</entity>
 <field column="file" name="name"/>
 <field column="file" name="fileName"/>
 <field column="fileAbsolutePath" name="links"/>
</entity>
    </document>
</dataConfig>




Solrconfig.xml:
<requestHandler name="/admin/file" 
                     class="solr.admin.ShowFileRequestHandler" >
       <lst name="invariants">
         <str name="hidden">synonyms.txt</str> 
         <str name="hidden">anotherfile.txt</str> 
       </lst>
     </requestHandler>


Please suggest.
thanks 
Jagdish



--
View this message in context: http://lucene.472066.n3.nabble.com/Solritas-issue-in-opening-files-tp3300836p3361588.html
Sent from the Solr - User mailing list archive at Nabble.com.

RE: Solritas issue in opening files

Posted by Jagdish Kumar <ja...@hotmail.com>.
Thanks Erik for ur inputs .. I will try them out and see if I get any further on this.
 
Thanks
Jagdish
 

> Date: Thu, 1 Sep 2011 06:28:34 -0700
> From: ml-node+3301258-983586473-392611@n3.nabble.com
> To: solr-user@lucene.apache.org
> Subject: Re: Solritas issue in opening files
> 
> 
> 
> If your files are under Solr's conf/ directory, you can get them served up using the ShowFileRequestHandler (see how the /browse serves up CSS and the autocomplete JQuery library). But otherwise, Solritas doesn't give you any capability to serve up files and the browsers aren't too happy about that either crossing domains and all.
> 
> This is not a Solr issue, it's a browser issue. But Solr (not Solritas per se) offers the ShowFileRequestHandler to serve up things under conf/ if you can get your files under there.
> 
> Erik
> 
> On Sep 1, 2011, at 07:19 , jagdish2011 [via Lucene] wrote:
> 
> > 
> > 
> > 
> > Hi Balaji
> > 
> > Thanks for your reply, I have tried file:///Absolute path stuff as well.. it still fails to open the file in mozilla/ IE both
> > 
> > My files are not placed in Solr-home , can that be the issue ? please suggest.
> > 
> > Thanks 
> > Jagdish
> > 
> > 
> >> Date: Thu, 1 Sep 2011 03:40:00 -0700
> >> From: ml-node+3300872-1705263717-392611@n3.nabble.com
> >> To: solr-user@lucene.apache.org
> >> Subject: Re: Solritas issue in opening files
> >> 
> >> Hi
> >> 
> >> To open files from local system use file protocol . (file:///<followed by
> >> absolute path>)
> >> 
> >> If you are running the application in jboss instead of jetty you can deploy
> >> the input files as a separate war which is exploded and then avoid using
> >> file protocol.
> >> 
> >> File protocol is erroneous. It is not supported by reputed browser like
> >> Firefox.
> >> 
> >> 
> >> 
> >> ______________________________________
> >> If you reply to this email, your message will be added to the discussion below:
> >> http://lucene.472066.n3.nabble.com/Solritas-issue-in-opening-files-tp3300836p3300872.html
> >> This email was sent by Balaji N.S. (via Nabble)
> >> To receive all replies by email, subscribe to this discussion: http://lucene.472066.n3.nabble.com/template/NamlServlet.jtp?macro=subscribe_by_code&node=3300836&code=c29sci11c2VyQGx1Y2VuZS5hcGFjaGUub3JnfDMzMDA4MzZ8MTIyNjQ0MTk0Mg==
> > 
> > 
> > _______________________________________________
> > If you reply to this email, your message will be added to the discussion below:
> > http://lucene.472066.n3.nabble.com/Solritas-issue-in-opening-files-tp3300836p3300964.html
> > 
> > To unsubscribe from Solritas issue in opening files, visit http://lucene.472066.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=3300836&code=c29sci11c2VyQGx1Y2VuZS5hcGFjaGUub3JnfDMzMDA4MzZ8MTIyNjQ0MTk0Mg==
> 
> 
> 
> _______________________________________________
> If you reply to this email, your message will be added to the discussion below:
> http://lucene.472066.n3.nabble.com/Solritas-issue-in-opening-files-tp3300836p3301258.html
> 
> To unsubscribe from Solritas issue in opening files, visit http://lucene.472066.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=3300836&code=c29sci11c2VyQGx1Y2VuZS5hcGFjaGUub3JnfDMzMDA4MzZ8MTIyNjQ0MTk0Mg==
 		 	   		  

RE: Solritas issue in opening files

Posted by "jagdish2011 [via Lucene]" <ml...@n3.nabble.com>.


Thanks Erik for ur inputs .. I will try them out and see if I get any further on this.
 
Thanks
Jagdish
 

> Date: Thu, 1 Sep 2011 06:28:34 -0700
> From: ml-node+3301258-983586473-392611@n3.nabble.com
> To: solr-user@lucene.apache.org
> Subject: Re: Solritas issue in opening files
> 
> 
> 
> If your files are under Solr's conf/ directory, you can get them served up using the ShowFileRequestHandler (see how the /browse serves up CSS and the autocomplete JQuery library). But otherwise, Solritas doesn't give you any capability to serve up files and the browsers aren't too happy about that either crossing domains and all.
> 
> This is not a Solr issue, it's a browser issue. But Solr (not Solritas per se) offers the ShowFileRequestHandler to serve up things under conf/ if you can get your files under there.
> 
> Erik
> 
> On Sep 1, 2011, at 07:19 , jagdish2011 [via Lucene] wrote:
> 
> > 
> > 
> > 
> > Hi Balaji
> > 
> > Thanks for your reply, I have tried file:///Absolute path stuff as well.. it still fails to open the file in mozilla/ IE both
> > 
> > My files are not placed in Solr-home , can that be the issue ? please suggest.
> > 
> > Thanks 
> > Jagdish
> > 
> > 
> >> Date: Thu, 1 Sep 2011 03:40:00 -0700
> >> From: ml-node+3300872-1705263717-392611@n3.nabble.com
> >> To: solr-user@lucene.apache.org
> >> Subject: Re: Solritas issue in opening files
> >> 
> >> Hi
> >> 
> >> To open files from local system use file protocol . (file:///<followed by
> >> absolute path>)
> >> 
> >> If you are running the application in jboss instead of jetty you can deploy
> >> the input files as a separate war which is exploded and then avoid using
> >> file protocol.
> >> 
> >> File protocol is erroneous. It is not supported by reputed browser like
> >> Firefox.
> >> 
> >> 
> >> 
> >> ______________________________________
> >> If you reply to this email, your message will be added to the discussion below:
> >> http://lucene.472066.n3.nabble.com/Solritas-issue-in-opening-files-tp3300836p3300872.html
> >> This email was sent by Balaji N.S. (via Nabble)
> >> To receive all replies by email, subscribe to this discussion: http://lucene.472066.n3.nabble.com/template/NamlServlet.jtp?macro=subscribe_by_code&node=3300836&code=c29sci11c2VyQGx1Y2VuZS5hcGFjaGUub3JnfDMzMDA4MzZ8MTIyNjQ0MTk0Mg==
> > 
> > 
> > _______________________________________________
> > If you reply to this email, your message will be added to the discussion below:
> > http://lucene.472066.n3.nabble.com/Solritas-issue-in-opening-files-tp3300836p3300964.html
> > 
> > To unsubscribe from Solritas issue in opening files, visit http://lucene.472066.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=3300836&code=c29sci11c2VyQGx1Y2VuZS5hcGFjaGUub3JnfDMzMDA4MzZ8MTIyNjQ0MTk0Mg==
> 
> 
> 
> _______________________________________________
> If you reply to this email, your message will be added to the discussion below:
> http://lucene.472066.n3.nabble.com/Solritas-issue-in-opening-files-tp3300836p3301258.html
> 
> To unsubscribe from Solritas issue in opening files, visit http://lucene.472066.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=3300836&code=c29sci11c2VyQGx1Y2VuZS5hcGFjaGUub3JnfDMzMDA4MzZ8MTIyNjQ0MTk0Mg==
 		 	   		  

_______________________________________________
If you reply to this email, your message will be added to the discussion below:
http://lucene.472066.n3.nabble.com/Solritas-issue-in-opening-files-tp3300836p3303486.html

To unsubscribe from Solritas issue in opening files, visit http://lucene.472066.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=3300836&code=c29sci11c2VyQGx1Y2VuZS5hcGFjaGUub3JnfDMzMDA4MzZ8MTIyNjQ0MTk0Mg==

Re: Solritas issue in opening files

Posted by "Erik Hatcher-4 [via Lucene]" <ml...@n3.nabble.com>.

If your files are under Solr's conf/ directory, you can get them served up using the ShowFileRequestHandler (see how the /browse serves up CSS and the autocomplete JQuery library).  But otherwise, Solritas doesn't give you any capability to serve up files and the browsers aren't too happy about that either crossing domains and all.

This is not a Solr issue, it's a browser issue.  But Solr (not Solritas per se) offers the ShowFileRequestHandler to serve up things under conf/ if you can get your files under there.

	Erik

On Sep 1, 2011, at 07:19 , jagdish2011 [via Lucene] wrote:

> 
> 
> 
> Hi Balaji
> 
> Thanks for your reply, I have tried file:///Absolute path stuff as well.. it still fails to open the file in mozilla/ IE both
> 
> My files are not placed in Solr-home , can that be the issue ? please suggest.
> 
> Thanks 
> Jagdish
> 
> 
>> Date: Thu, 1 Sep 2011 03:40:00 -0700
>> From: ml-node+3300872-1705263717-392611@n3.nabble.com
>> To: solr-user@lucene.apache.org
>> Subject: Re: Solritas issue in opening files
>> 
>> Hi
>> 
>> To open files from local system use file protocol . (file:///<followed by
>> absolute path>)
>> 
>> If you are running the application in jboss instead of jetty you can deploy
>> the input files as a separate war which is exploded and then avoid using
>> file protocol.
>> 
>> File protocol is erroneous. It is not supported by reputed browser like
>> Firefox.
>> 
>> 
>> 
>> ______________________________________
>> If you reply to this email, your message will be added to the discussion below:
>> http://lucene.472066.n3.nabble.com/Solritas-issue-in-opening-files-tp3300836p3300872.html
>> This email was sent by Balaji N.S. (via Nabble)
>> To receive all replies by email, subscribe to this discussion: http://lucene.472066.n3.nabble.com/template/NamlServlet.jtp?macro=subscribe_by_code&node=3300836&code=c29sci11c2VyQGx1Y2VuZS5hcGFjaGUub3JnfDMzMDA4MzZ8MTIyNjQ0MTk0Mg==
> 		 	   		  
> 
> _______________________________________________
> If you reply to this email, your message will be added to the discussion below:
> http://lucene.472066.n3.nabble.com/Solritas-issue-in-opening-files-tp3300836p3300964.html
> 
> To unsubscribe from Solritas issue in opening files, visit http://lucene.472066.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=3300836&code=c29sci11c2VyQGx1Y2VuZS5hcGFjaGUub3JnfDMzMDA4MzZ8MTIyNjQ0MTk0Mg==



_______________________________________________
If you reply to this email, your message will be added to the discussion below:
http://lucene.472066.n3.nabble.com/Solritas-issue-in-opening-files-tp3300836p3301258.html

To unsubscribe from Solritas issue in opening files, visit http://lucene.472066.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=3300836&code=c29sci11c2VyQGx1Y2VuZS5hcGFjaGUub3JnfDMzMDA4MzZ8MTIyNjQ0MTk0Mg==

Re: Solritas issue in opening files

Posted by Erik Hatcher <er...@gmail.com>.
If your files are under Solr's conf/ directory, you can get them served up using the ShowFileRequestHandler (see how the /browse serves up CSS and the autocomplete JQuery library).  But otherwise, Solritas doesn't give you any capability to serve up files and the browsers aren't too happy about that either crossing domains and all.

This is not a Solr issue, it's a browser issue.  But Solr (not Solritas per se) offers the ShowFileRequestHandler to serve up things under conf/ if you can get your files under there.

	Erik

On Sep 1, 2011, at 07:19 , jagdish2011 [via Lucene] wrote:

> 
> 
> 
> Hi Balaji
> 
> Thanks for your reply, I have tried file:///Absolute path stuff as well.. it still fails to open the file in mozilla/ IE both
> 
> My files are not placed in Solr-home , can that be the issue ? please suggest.
> 
> Thanks 
> Jagdish
> 
> 
>> Date: Thu, 1 Sep 2011 03:40:00 -0700
>> From: ml-node+3300872-1705263717-392611@n3.nabble.com
>> To: solr-user@lucene.apache.org
>> Subject: Re: Solritas issue in opening files
>> 
>> Hi
>> 
>> To open files from local system use file protocol . (file:///<followed by
>> absolute path>)
>> 
>> If you are running the application in jboss instead of jetty you can deploy
>> the input files as a separate war which is exploded and then avoid using
>> file protocol.
>> 
>> File protocol is erroneous. It is not supported by reputed browser like
>> Firefox.
>> 
>> 
>> 
>> ______________________________________
>> If you reply to this email, your message will be added to the discussion below:
>> http://lucene.472066.n3.nabble.com/Solritas-issue-in-opening-files-tp3300836p3300872.html
>> This email was sent by Balaji N.S. (via Nabble)
>> To receive all replies by email, subscribe to this discussion: http://lucene.472066.n3.nabble.com/template/NamlServlet.jtp?macro=subscribe_by_code&node=3300836&code=c29sci11c2VyQGx1Y2VuZS5hcGFjaGUub3JnfDMzMDA4MzZ8MTIyNjQ0MTk0Mg==
> 		 	   		  
> 
> _______________________________________________
> If you reply to this email, your message will be added to the discussion below:
> http://lucene.472066.n3.nabble.com/Solritas-issue-in-opening-files-tp3300836p3300964.html
> 
> To unsubscribe from Solritas issue in opening files, visit http://lucene.472066.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=3300836&code=c29sci11c2VyQGx1Y2VuZS5hcGFjaGUub3JnfDMzMDA4MzZ8MTIyNjQ0MTk0Mg==


RE: Solritas issue in opening files

Posted by "jagdish2011 [via Lucene]" <ml...@n3.nabble.com>.


Hi Balaji
 
Thanks for your reply, I have tried file:///Absolute path stuff as well.. it still fails to open the file in mozilla/ IE both
 
My files are not placed in Solr-home , can that be the issue ? please suggest.
 
Thanks 
Jagdish
 

> Date: Thu, 1 Sep 2011 03:40:00 -0700
> From: ml-node+3300872-1705263717-392611@n3.nabble.com
> To: solr-user@lucene.apache.org
> Subject: Re: Solritas issue in opening files
> 
> Hi
> 
> To open files from local system use file protocol . (file:///<followed by
> absolute path>)
> 
> If you are running the application in jboss instead of jetty you can deploy
> the input files as a separate war which is exploded and then avoid using
> file protocol.
> 
> File protocol is erroneous. It is not supported by reputed browser like
> Firefox.
> 
> 
> 
> ______________________________________
> If you reply to this email, your message will be added to the discussion below:
> http://lucene.472066.n3.nabble.com/Solritas-issue-in-opening-files-tp3300836p3300872.html
> This email was sent by Balaji N.S. (via Nabble)
> To receive all replies by email, subscribe to this discussion: http://lucene.472066.n3.nabble.com/template/NamlServlet.jtp?macro=subscribe_by_code&node=3300836&code=c29sci11c2VyQGx1Y2VuZS5hcGFjaGUub3JnfDMzMDA4MzZ8MTIyNjQ0MTk0Mg==
 		 	   		  

_______________________________________________
If you reply to this email, your message will be added to the discussion below:
http://lucene.472066.n3.nabble.com/Solritas-issue-in-opening-files-tp3300836p3300964.html

To unsubscribe from Solritas issue in opening files, visit http://lucene.472066.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=3300836&code=c29sci11c2VyQGx1Y2VuZS5hcGFjaGUub3JnfDMzMDA4MzZ8MTIyNjQ0MTk0Mg==

RE: Solritas issue in opening files

Posted by Jagdish Kumar <ja...@hotmail.com>.
Hi Balaji
 
Thanks for your reply, I have tried file:///Absolute path stuff as well.. it still fails to open the file in mozilla/ IE both
 
My files are not placed in Solr-home , can that be the issue ? please suggest.
 
Thanks 
Jagdish
 

> Date: Thu, 1 Sep 2011 03:40:00 -0700
> From: ml-node+3300872-1705263717-392611@n3.nabble.com
> To: solr-user@lucene.apache.org
> Subject: Re: Solritas issue in opening files
> 
> Hi
> 
> To open files from local system use file protocol . (file:///<followed by
> absolute path>)
> 
> If you are running the application in jboss instead of jetty you can deploy
> the input files as a separate war which is exploded and then avoid using
> file protocol.
> 
> File protocol is erroneous. It is not supported by reputed browser like
> Firefox.
> 
> 
> 
> ______________________________________
> If you reply to this email, your message will be added to the discussion below:
> http://lucene.472066.n3.nabble.com/Solritas-issue-in-opening-files-tp3300836p3300872.html
> This email was sent by Balaji N.S. (via Nabble)
> To receive all replies by email, subscribe to this discussion: http://lucene.472066.n3.nabble.com/template/NamlServlet.jtp?macro=subscribe_by_code&node=3300836&code=c29sci11c2VyQGx1Y2VuZS5hcGFjaGUub3JnfDMzMDA4MzZ8MTIyNjQ0MTk0Mg==
 		 	   		  

Re: Solritas issue in opening files

Posted by "Balaji N.S. [via Lucene]" <ml...@n3.nabble.com>.
Hi

To open files from local system use file protocol . (file:///<followed by
absolute path>)

If you are running the application in jboss instead of jetty you can deploy
the input files as a separate war which is exploded and then avoid using
file protocol.

File protocol is erroneous. It is not supported by reputed browser like
Firefox.



______________________________________
If you reply to this email, your message will be added to the discussion below:
http://lucene.472066.n3.nabble.com/Solritas-issue-in-opening-files-tp3300836p3300872.html
This email was sent by Balaji N.S. (via Nabble)
To receive all replies by email, subscribe to this discussion: http://lucene.472066.n3.nabble.com/template/NamlServlet.jtp?macro=subscribe_by_code&node=3300836&code=c29sci11c2VyQGx1Y2VuZS5hcGFjaGUub3JnfDMzMDA4MzZ8MTIyNjQ0MTk0Mg==