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 Zheng Lin Edwin Yeo <ed...@gmail.com> on 2016/02/18 09:48:11 UTC

Field exclusion from fl and hl.fl

Hi,

Would like to find out, is there already a way to exclude field from the
Solr response. I did came across SOLR-3191 which was created about 4 years
ago, but could not find any workable solutions from there.

As my collections can have more than 100 fields, and I would need to return
the majority of then except for one or two, so if there is a way to exclude
the fields would be good, if not I have to list all the remaining fields
(which can be more than 100 for each collections).

I am using Solr 5.4.0.

Regards,
Edwin

Re: Field exclusion from fl and hl.fl

Posted by Erik Hatcher <er...@gmail.com>.
I don't believe that was ever supported. But Scott and I have been working through SOLR-3191 recently to get that need addressed.  Maybe some time next week we will have a ready to commit patch up. 

    Erik

> On Mar 5, 2016, at 22:19, William Bell <bi...@gmail.com> wrote:
> 
> it used to support
> 
> fl=*,-field
> 
> Does that not work now?
> 
> On Sat, Mar 5, 2016 at 7:37 PM, Zheng Lin Edwin Yeo <ed...@gmail.com>
> wrote:
> 
>> I have yet to find any workaround so far.Still have to list out all the
>> remaining fields one by one.
>> 
>> Does anyone else has any suggestions?
>> 
>> Regards,
>> Edwin
>> 
>> 
>>> On 18 February 2016 at 17:07, Anil <an...@gmail.com> wrote:
>>> 
>>> I am looking for the same. please do let me know just in case you find
>>> workaround.
>>> 
>>> On 18 February 2016 at 14:18, Zheng Lin Edwin Yeo <ed...@gmail.com>
>>> wrote:
>>> 
>>>> Hi,
>>>> 
>>>> Would like to find out, is there already a way to exclude field from
>> the
>>>> Solr response. I did came across SOLR-3191 which was created about 4
>>> years
>>>> ago, but could not find any workable solutions from there.
>>>> 
>>>> As my collections can have more than 100 fields, and I would need to
>>> return
>>>> the majority of then except for one or two, so if there is a way to
>>> exclude
>>>> the fields would be good, if not I have to list all the remaining
>> fields
>>>> (which can be more than 100 for each collections).
>>>> 
>>>> I am using Solr 5.4.0.
>>>> 
>>>> Regards,
>>>> Edwin
> 
> 
> 
> -- 
> Bill Bell
> billnbell@gmail.com
> cell 720-256-8076

Re: Field exclusion from fl and hl.fl

Posted by Erick Erickson <er...@gmail.com>.
I'll be happy to commit it if someone fixes the current problems with it.

Best,
Erick

On Sun, Mar 6, 2016 at 6:44 PM, Zheng Lin Edwin Yeo
<ed...@gmail.com> wrote:
> Thank you.
>
> Looking forward for this to be solved.
>
> Regards,
> Edwin
>
>
> On 7 March 2016 at 07:41, William Bell <bi...@gmail.com> wrote:
>
>> Can we get this over the goal line?
>>
>> https://issues.apache.org/jira/browse/SOLR-3191
>>
>> On Sun, Mar 6, 2016 at 3:16 AM, Zheng Lin Edwin Yeo <ed...@gmail.com>
>> wrote:
>>
>> > Hi,
>> >
>> > No, I tried that and I got the following error.
>> >
>> > {
>> >   "responseHeader":{
>> >     "status":500,
>> >     "QTime":0},
>> >   "error":{
>> >     "msg":"For input string: \"-\"",
>> >     "trace":"java.lang.NumberFormatException: For input string:
>> > \"-\"\r\n\tat
>> >
>> java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)\r\n\tat
>> > java.lang.Long.parseLong(Long.java:581)\r\n\tat
>> > java.lang.Long.parseLong(Long.java:631)\r\n\tat
>> > org.apache.solr.search.StrParser.getNumber(StrParser.java:124)\r\n\tat
>> >
>> >
>> org.apache.solr.search.FunctionQParser.parseValueSource(FunctionQParser.java:298)\r\n\tat
>> >
>> >
>> org.apache.solr.search.FunctionQParser.parse(FunctionQParser.java:80)\r\n\tat
>> > org.apache.solr.search.QParser.getQuery(QParser.java:141)\r\n\tat
>> >
>> >
>> org.apache.solr.search.SolrReturnFields.add(SolrReturnFields.java:297)\r\n\tat
>> >
>> >
>> org.apache.solr.search.SolrReturnFields.parseFieldList(SolrReturnFields.java:113)\r\n\tat
>> >
>> >
>> org.apache.solr.search.SolrReturnFields.<init>(SolrReturnFields.java:99)\r\n\tat
>> >
>> >
>> org.apache.solr.search.SolrReturnFields.<init>(SolrReturnFields.java:75)\r\n\tat
>> >
>> >
>> org.apache.solr.handler.component.QueryComponent.prepare(QueryComponent.java:139)\r\n\tat
>> >
>> >
>> org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:247)\r\n\tat
>> >
>> >
>> org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:156)\r\n\tat
>> > org.apache.solr.core.SolrCore.execute(SolrCore.java:2073)\r\n\tat
>> >
>> org.apache.solr.servlet.HttpSolrCall.execute(HttpSolrCall.java:658)\r\n\tat
>> > org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:457)\r\n\tat
>> >
>> >
>> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:222)\r\n\tat
>> >
>> >
>> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:181)\r\n\tat
>> >
>> >
>> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)\r\n\tat
>> >
>> >
>> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)\r\n\tat
>> >
>> >
>> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)\r\n\tat
>> >
>> >
>> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)\r\n\tat
>> >
>> >
>> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)\r\n\tat
>> >
>> >
>> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)\r\n\tat
>> >
>> >
>> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)\r\n\tat
>> >
>> >
>> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)\r\n\tat
>> >
>> >
>> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)\r\n\tat
>> >
>> >
>> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)\r\n\tat
>> >
>> >
>> org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)\r\n\tat
>> >
>> >
>> org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)\r\n\tat
>> >
>> >
>> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)\r\n\tat
>> > org.eclipse.jetty.server.Server.handle(Server.java:499)\r\n\tat
>> > org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)\r\n\tat
>> >
>> >
>> org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)\r\n\tat
>> >
>> >
>> org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)\r\n\tat
>> >
>> >
>> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)\r\n\tat
>> >
>> >
>> org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)\r\n\tat
>> > java.lang.Thread.run(Thread.java:745)\r\n",
>> >     "code":500}}
>> >
>> >
>> > Regards,
>> > Edwin
>> >
>> >
>> > On 6 March 2016 at 11:19, William Bell <bi...@gmail.com> wrote:
>> >
>> > > it used to support
>> > >
>> > > fl=*,-field
>> > >
>> > > Does that not work now?
>> > >
>> > > On Sat, Mar 5, 2016 at 7:37 PM, Zheng Lin Edwin Yeo <
>> > edwinyeozl@gmail.com>
>> > > wrote:
>> > >
>> > > > I have yet to find any workaround so far.Still have to list out all
>> the
>> > > > remaining fields one by one.
>> > > >
>> > > > Does anyone else has any suggestions?
>> > > >
>> > > > Regards,
>> > > > Edwin
>> > > >
>> > > >
>> > > > On 18 February 2016 at 17:07, Anil <an...@gmail.com> wrote:
>> > > >
>> > > > > I am looking for the same. please do let me know just in case you
>> > find
>> > > > > workaround.
>> > > > >
>> > > > > On 18 February 2016 at 14:18, Zheng Lin Edwin Yeo <
>> > > edwinyeozl@gmail.com>
>> > > > > wrote:
>> > > > >
>> > > > > > Hi,
>> > > > > >
>> > > > > > Would like to find out, is there already a way to exclude field
>> > from
>> > > > the
>> > > > > > Solr response. I did came across SOLR-3191 which was created
>> about
>> > 4
>> > > > > years
>> > > > > > ago, but could not find any workable solutions from there.
>> > > > > >
>> > > > > > As my collections can have more than 100 fields, and I would need
>> > to
>> > > > > return
>> > > > > > the majority of then except for one or two, so if there is a way
>> to
>> > > > > exclude
>> > > > > > the fields would be good, if not I have to list all the remaining
>> > > > fields
>> > > > > > (which can be more than 100 for each collections).
>> > > > > >
>> > > > > > I am using Solr 5.4.0.
>> > > > > >
>> > > > > > Regards,
>> > > > > > Edwin
>> > > > > >
>> > > > >
>> > > >
>> > >
>> > >
>> > >
>> > > --
>> > > Bill Bell
>> > > billnbell@gmail.com
>> > > cell 720-256-8076
>> > >
>> >
>>
>>
>>
>> --
>> Bill Bell
>> billnbell@gmail.com
>> cell 720-256-8076
>>

Re: Field exclusion from fl and hl.fl

Posted by Zheng Lin Edwin Yeo <ed...@gmail.com>.
Thank you.

Looking forward for this to be solved.

Regards,
Edwin


On 7 March 2016 at 07:41, William Bell <bi...@gmail.com> wrote:

> Can we get this over the goal line?
>
> https://issues.apache.org/jira/browse/SOLR-3191
>
> On Sun, Mar 6, 2016 at 3:16 AM, Zheng Lin Edwin Yeo <ed...@gmail.com>
> wrote:
>
> > Hi,
> >
> > No, I tried that and I got the following error.
> >
> > {
> >   "responseHeader":{
> >     "status":500,
> >     "QTime":0},
> >   "error":{
> >     "msg":"For input string: \"-\"",
> >     "trace":"java.lang.NumberFormatException: For input string:
> > \"-\"\r\n\tat
> >
> java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)\r\n\tat
> > java.lang.Long.parseLong(Long.java:581)\r\n\tat
> > java.lang.Long.parseLong(Long.java:631)\r\n\tat
> > org.apache.solr.search.StrParser.getNumber(StrParser.java:124)\r\n\tat
> >
> >
> org.apache.solr.search.FunctionQParser.parseValueSource(FunctionQParser.java:298)\r\n\tat
> >
> >
> org.apache.solr.search.FunctionQParser.parse(FunctionQParser.java:80)\r\n\tat
> > org.apache.solr.search.QParser.getQuery(QParser.java:141)\r\n\tat
> >
> >
> org.apache.solr.search.SolrReturnFields.add(SolrReturnFields.java:297)\r\n\tat
> >
> >
> org.apache.solr.search.SolrReturnFields.parseFieldList(SolrReturnFields.java:113)\r\n\tat
> >
> >
> org.apache.solr.search.SolrReturnFields.<init>(SolrReturnFields.java:99)\r\n\tat
> >
> >
> org.apache.solr.search.SolrReturnFields.<init>(SolrReturnFields.java:75)\r\n\tat
> >
> >
> org.apache.solr.handler.component.QueryComponent.prepare(QueryComponent.java:139)\r\n\tat
> >
> >
> org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:247)\r\n\tat
> >
> >
> org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:156)\r\n\tat
> > org.apache.solr.core.SolrCore.execute(SolrCore.java:2073)\r\n\tat
> >
> org.apache.solr.servlet.HttpSolrCall.execute(HttpSolrCall.java:658)\r\n\tat
> > org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:457)\r\n\tat
> >
> >
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:222)\r\n\tat
> >
> >
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:181)\r\n\tat
> >
> >
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)\r\n\tat
> >
> >
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)\r\n\tat
> >
> >
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)\r\n\tat
> >
> >
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)\r\n\tat
> >
> >
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)\r\n\tat
> >
> >
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)\r\n\tat
> >
> >
> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)\r\n\tat
> >
> >
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)\r\n\tat
> >
> >
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)\r\n\tat
> >
> >
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)\r\n\tat
> >
> >
> org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)\r\n\tat
> >
> >
> org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)\r\n\tat
> >
> >
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)\r\n\tat
> > org.eclipse.jetty.server.Server.handle(Server.java:499)\r\n\tat
> > org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)\r\n\tat
> >
> >
> org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)\r\n\tat
> >
> >
> org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)\r\n\tat
> >
> >
> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)\r\n\tat
> >
> >
> org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)\r\n\tat
> > java.lang.Thread.run(Thread.java:745)\r\n",
> >     "code":500}}
> >
> >
> > Regards,
> > Edwin
> >
> >
> > On 6 March 2016 at 11:19, William Bell <bi...@gmail.com> wrote:
> >
> > > it used to support
> > >
> > > fl=*,-field
> > >
> > > Does that not work now?
> > >
> > > On Sat, Mar 5, 2016 at 7:37 PM, Zheng Lin Edwin Yeo <
> > edwinyeozl@gmail.com>
> > > wrote:
> > >
> > > > I have yet to find any workaround so far.Still have to list out all
> the
> > > > remaining fields one by one.
> > > >
> > > > Does anyone else has any suggestions?
> > > >
> > > > Regards,
> > > > Edwin
> > > >
> > > >
> > > > On 18 February 2016 at 17:07, Anil <an...@gmail.com> wrote:
> > > >
> > > > > I am looking for the same. please do let me know just in case you
> > find
> > > > > workaround.
> > > > >
> > > > > On 18 February 2016 at 14:18, Zheng Lin Edwin Yeo <
> > > edwinyeozl@gmail.com>
> > > > > wrote:
> > > > >
> > > > > > Hi,
> > > > > >
> > > > > > Would like to find out, is there already a way to exclude field
> > from
> > > > the
> > > > > > Solr response. I did came across SOLR-3191 which was created
> about
> > 4
> > > > > years
> > > > > > ago, but could not find any workable solutions from there.
> > > > > >
> > > > > > As my collections can have more than 100 fields, and I would need
> > to
> > > > > return
> > > > > > the majority of then except for one or two, so if there is a way
> to
> > > > > exclude
> > > > > > the fields would be good, if not I have to list all the remaining
> > > > fields
> > > > > > (which can be more than 100 for each collections).
> > > > > >
> > > > > > I am using Solr 5.4.0.
> > > > > >
> > > > > > Regards,
> > > > > > Edwin
> > > > > >
> > > > >
> > > >
> > >
> > >
> > >
> > > --
> > > Bill Bell
> > > billnbell@gmail.com
> > > cell 720-256-8076
> > >
> >
>
>
>
> --
> Bill Bell
> billnbell@gmail.com
> cell 720-256-8076
>

Re: Field exclusion from fl and hl.fl

Posted by William Bell <bi...@gmail.com>.
Can we get this over the goal line?

https://issues.apache.org/jira/browse/SOLR-3191

On Sun, Mar 6, 2016 at 3:16 AM, Zheng Lin Edwin Yeo <ed...@gmail.com>
wrote:

> Hi,
>
> No, I tried that and I got the following error.
>
> {
>   "responseHeader":{
>     "status":500,
>     "QTime":0},
>   "error":{
>     "msg":"For input string: \"-\"",
>     "trace":"java.lang.NumberFormatException: For input string:
> \"-\"\r\n\tat
> java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)\r\n\tat
> java.lang.Long.parseLong(Long.java:581)\r\n\tat
> java.lang.Long.parseLong(Long.java:631)\r\n\tat
> org.apache.solr.search.StrParser.getNumber(StrParser.java:124)\r\n\tat
>
> org.apache.solr.search.FunctionQParser.parseValueSource(FunctionQParser.java:298)\r\n\tat
>
> org.apache.solr.search.FunctionQParser.parse(FunctionQParser.java:80)\r\n\tat
> org.apache.solr.search.QParser.getQuery(QParser.java:141)\r\n\tat
>
> org.apache.solr.search.SolrReturnFields.add(SolrReturnFields.java:297)\r\n\tat
>
> org.apache.solr.search.SolrReturnFields.parseFieldList(SolrReturnFields.java:113)\r\n\tat
>
> org.apache.solr.search.SolrReturnFields.<init>(SolrReturnFields.java:99)\r\n\tat
>
> org.apache.solr.search.SolrReturnFields.<init>(SolrReturnFields.java:75)\r\n\tat
>
> org.apache.solr.handler.component.QueryComponent.prepare(QueryComponent.java:139)\r\n\tat
>
> org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:247)\r\n\tat
>
> org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:156)\r\n\tat
> org.apache.solr.core.SolrCore.execute(SolrCore.java:2073)\r\n\tat
> org.apache.solr.servlet.HttpSolrCall.execute(HttpSolrCall.java:658)\r\n\tat
> org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:457)\r\n\tat
>
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:222)\r\n\tat
>
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:181)\r\n\tat
>
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)\r\n\tat
>
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)\r\n\tat
>
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)\r\n\tat
>
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)\r\n\tat
>
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)\r\n\tat
>
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)\r\n\tat
>
> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)\r\n\tat
>
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)\r\n\tat
>
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)\r\n\tat
>
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)\r\n\tat
>
> org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)\r\n\tat
>
> org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)\r\n\tat
>
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)\r\n\tat
> org.eclipse.jetty.server.Server.handle(Server.java:499)\r\n\tat
> org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)\r\n\tat
>
> org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)\r\n\tat
>
> org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)\r\n\tat
>
> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)\r\n\tat
>
> org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)\r\n\tat
> java.lang.Thread.run(Thread.java:745)\r\n",
>     "code":500}}
>
>
> Regards,
> Edwin
>
>
> On 6 March 2016 at 11:19, William Bell <bi...@gmail.com> wrote:
>
> > it used to support
> >
> > fl=*,-field
> >
> > Does that not work now?
> >
> > On Sat, Mar 5, 2016 at 7:37 PM, Zheng Lin Edwin Yeo <
> edwinyeozl@gmail.com>
> > wrote:
> >
> > > I have yet to find any workaround so far.Still have to list out all the
> > > remaining fields one by one.
> > >
> > > Does anyone else has any suggestions?
> > >
> > > Regards,
> > > Edwin
> > >
> > >
> > > On 18 February 2016 at 17:07, Anil <an...@gmail.com> wrote:
> > >
> > > > I am looking for the same. please do let me know just in case you
> find
> > > > workaround.
> > > >
> > > > On 18 February 2016 at 14:18, Zheng Lin Edwin Yeo <
> > edwinyeozl@gmail.com>
> > > > wrote:
> > > >
> > > > > Hi,
> > > > >
> > > > > Would like to find out, is there already a way to exclude field
> from
> > > the
> > > > > Solr response. I did came across SOLR-3191 which was created about
> 4
> > > > years
> > > > > ago, but could not find any workable solutions from there.
> > > > >
> > > > > As my collections can have more than 100 fields, and I would need
> to
> > > > return
> > > > > the majority of then except for one or two, so if there is a way to
> > > > exclude
> > > > > the fields would be good, if not I have to list all the remaining
> > > fields
> > > > > (which can be more than 100 for each collections).
> > > > >
> > > > > I am using Solr 5.4.0.
> > > > >
> > > > > Regards,
> > > > > Edwin
> > > > >
> > > >
> > >
> >
> >
> >
> > --
> > Bill Bell
> > billnbell@gmail.com
> > cell 720-256-8076
> >
>



-- 
Bill Bell
billnbell@gmail.com
cell 720-256-8076

Re: Field exclusion from fl and hl.fl

Posted by Zheng Lin Edwin Yeo <ed...@gmail.com>.
Hi,

No, I tried that and I got the following error.

{
  "responseHeader":{
    "status":500,
    "QTime":0},
  "error":{
    "msg":"For input string: \"-\"",
    "trace":"java.lang.NumberFormatException: For input string:
\"-\"\r\n\tat java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)\r\n\tat
java.lang.Long.parseLong(Long.java:581)\r\n\tat
java.lang.Long.parseLong(Long.java:631)\r\n\tat
org.apache.solr.search.StrParser.getNumber(StrParser.java:124)\r\n\tat
org.apache.solr.search.FunctionQParser.parseValueSource(FunctionQParser.java:298)\r\n\tat
org.apache.solr.search.FunctionQParser.parse(FunctionQParser.java:80)\r\n\tat
org.apache.solr.search.QParser.getQuery(QParser.java:141)\r\n\tat
org.apache.solr.search.SolrReturnFields.add(SolrReturnFields.java:297)\r\n\tat
org.apache.solr.search.SolrReturnFields.parseFieldList(SolrReturnFields.java:113)\r\n\tat
org.apache.solr.search.SolrReturnFields.<init>(SolrReturnFields.java:99)\r\n\tat
org.apache.solr.search.SolrReturnFields.<init>(SolrReturnFields.java:75)\r\n\tat
org.apache.solr.handler.component.QueryComponent.prepare(QueryComponent.java:139)\r\n\tat
org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:247)\r\n\tat
org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:156)\r\n\tat
org.apache.solr.core.SolrCore.execute(SolrCore.java:2073)\r\n\tat
org.apache.solr.servlet.HttpSolrCall.execute(HttpSolrCall.java:658)\r\n\tat
org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:457)\r\n\tat
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:222)\r\n\tat
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:181)\r\n\tat
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)\r\n\tat
org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)\r\n\tat
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)\r\n\tat
org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)\r\n\tat
org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)\r\n\tat
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)\r\n\tat
org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)\r\n\tat
org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)\r\n\tat
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)\r\n\tat
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)\r\n\tat
org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)\r\n\tat
org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)\r\n\tat
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)\r\n\tat
org.eclipse.jetty.server.Server.handle(Server.java:499)\r\n\tat
org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)\r\n\tat
org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)\r\n\tat
org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)\r\n\tat
org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)\r\n\tat
org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)\r\n\tat
java.lang.Thread.run(Thread.java:745)\r\n",
    "code":500}}


Regards,
Edwin


On 6 March 2016 at 11:19, William Bell <bi...@gmail.com> wrote:

> it used to support
>
> fl=*,-field
>
> Does that not work now?
>
> On Sat, Mar 5, 2016 at 7:37 PM, Zheng Lin Edwin Yeo <ed...@gmail.com>
> wrote:
>
> > I have yet to find any workaround so far.Still have to list out all the
> > remaining fields one by one.
> >
> > Does anyone else has any suggestions?
> >
> > Regards,
> > Edwin
> >
> >
> > On 18 February 2016 at 17:07, Anil <an...@gmail.com> wrote:
> >
> > > I am looking for the same. please do let me know just in case you find
> > > workaround.
> > >
> > > On 18 February 2016 at 14:18, Zheng Lin Edwin Yeo <
> edwinyeozl@gmail.com>
> > > wrote:
> > >
> > > > Hi,
> > > >
> > > > Would like to find out, is there already a way to exclude field from
> > the
> > > > Solr response. I did came across SOLR-3191 which was created about 4
> > > years
> > > > ago, but could not find any workable solutions from there.
> > > >
> > > > As my collections can have more than 100 fields, and I would need to
> > > return
> > > > the majority of then except for one or two, so if there is a way to
> > > exclude
> > > > the fields would be good, if not I have to list all the remaining
> > fields
> > > > (which can be more than 100 for each collections).
> > > >
> > > > I am using Solr 5.4.0.
> > > >
> > > > Regards,
> > > > Edwin
> > > >
> > >
> >
>
>
>
> --
> Bill Bell
> billnbell@gmail.com
> cell 720-256-8076
>

Re: Field exclusion from fl and hl.fl

Posted by William Bell <bi...@gmail.com>.
it used to support

fl=*,-field

Does that not work now?

On Sat, Mar 5, 2016 at 7:37 PM, Zheng Lin Edwin Yeo <ed...@gmail.com>
wrote:

> I have yet to find any workaround so far.Still have to list out all the
> remaining fields one by one.
>
> Does anyone else has any suggestions?
>
> Regards,
> Edwin
>
>
> On 18 February 2016 at 17:07, Anil <an...@gmail.com> wrote:
>
> > I am looking for the same. please do let me know just in case you find
> > workaround.
> >
> > On 18 February 2016 at 14:18, Zheng Lin Edwin Yeo <ed...@gmail.com>
> > wrote:
> >
> > > Hi,
> > >
> > > Would like to find out, is there already a way to exclude field from
> the
> > > Solr response. I did came across SOLR-3191 which was created about 4
> > years
> > > ago, but could not find any workable solutions from there.
> > >
> > > As my collections can have more than 100 fields, and I would need to
> > return
> > > the majority of then except for one or two, so if there is a way to
> > exclude
> > > the fields would be good, if not I have to list all the remaining
> fields
> > > (which can be more than 100 for each collections).
> > >
> > > I am using Solr 5.4.0.
> > >
> > > Regards,
> > > Edwin
> > >
> >
>



-- 
Bill Bell
billnbell@gmail.com
cell 720-256-8076

Re: Field exclusion from fl and hl.fl

Posted by Zheng Lin Edwin Yeo <ed...@gmail.com>.
I have yet to find any workaround so far.Still have to list out all the
remaining fields one by one.

Does anyone else has any suggestions?

Regards,
Edwin


On 18 February 2016 at 17:07, Anil <an...@gmail.com> wrote:

> I am looking for the same. please do let me know just in case you find
> workaround.
>
> On 18 February 2016 at 14:18, Zheng Lin Edwin Yeo <ed...@gmail.com>
> wrote:
>
> > Hi,
> >
> > Would like to find out, is there already a way to exclude field from the
> > Solr response. I did came across SOLR-3191 which was created about 4
> years
> > ago, but could not find any workable solutions from there.
> >
> > As my collections can have more than 100 fields, and I would need to
> return
> > the majority of then except for one or two, so if there is a way to
> exclude
> > the fields would be good, if not I have to list all the remaining fields
> > (which can be more than 100 for each collections).
> >
> > I am using Solr 5.4.0.
> >
> > Regards,
> > Edwin
> >
>

Re: Field exclusion from fl and hl.fl

Posted by Anil <an...@gmail.com>.
I am looking for the same. please do let me know just in case you find
workaround.

On 18 February 2016 at 14:18, Zheng Lin Edwin Yeo <ed...@gmail.com>
wrote:

> Hi,
>
> Would like to find out, is there already a way to exclude field from the
> Solr response. I did came across SOLR-3191 which was created about 4 years
> ago, but could not find any workable solutions from there.
>
> As my collections can have more than 100 fields, and I would need to return
> the majority of then except for one or two, so if there is a way to exclude
> the fields would be good, if not I have to list all the remaining fields
> (which can be more than 100 for each collections).
>
> I am using Solr 5.4.0.
>
> Regards,
> Edwin
>