If a field isn't specified then it will default to 'text'. Which should work for plain text. But just as a sanity check I'd also be curious to see the results of the *:* query.
On Wed, Nov 27, 2013 at 11:15 AM, Eric Redmond <[email protected]> wrote: > That is not a valid solr query. You need to search by field:value. Try: > > http://192.168.1.10:8098/solr/logs/select?q=*:* > > Eric > > On Nov 27, 2013, at 7:23 AM, Kartik Thakore <[email protected]> wrote: > > Cool. I did the data activate and emptied out the bucket and set the props > and created a different index. Still no go > > Here is the data: > "[2013-11-27T15:21:30] [ERROR] [192.168.1.102] [zach.scratchd.ca] [0] [ > [email protected]] test" > > Here is the search: > http://192.168.1.10:8098/solr/logs/select?q=* > > http://192.168.1.10:8098/solr/logs/select?q=test > > > No results found > > > On Tue, Nov 26, 2013 at 8:56 PM, Ryan Zezeski <[email protected]> wrote: > >> Kartik, >> >> The pre7 tag incorporates the new bucket type integration. Bucket types >> are a new feature in 2.0 that provide additional namespace support and more >> efficient bucket properties (good for when you have many buckets with >> custom properties). The particular code you are running against requires >> that for data to be indexed in Yokozuna it must be stored under a >> non-default bucket type. Since you are not specifying a type the logs >> bucket lives under the default type where `yz_index` will not be applied. >> This will be changed for 2.0 so that any type of bucket may be indexed. In >> the meantime, try this: >> >> riak-admin bucket-type create data '{"props":{}}' >> riak-admin bucket-type activate data >> >> curl -X PUT -H 'content-type: application/json' ' >> http://host:port/types/data/buckets/logs/props' -d >> '{"props":{"yz_index":"allLogs"}}' >> >> That above will change soon as well. We are attempting to rename most >> user facing parts of Yokozuna to just "search". This means that `yz_index` >> will soon become `search_index`. Sorry for the inconvenience as things are >> in a bit of flux leading up to 2.0. >> >> -Z >> >> >> On Tue, Nov 26, 2013 at 5:59 PM, Kartik Thakore <[email protected]>wrote: >> >>> So finally got a chance to try this and I am running into issues (I am >>> on Riak 2.0pre7) btw. >>> >>> I have yz turned on: >>> >>> http://192.168.1.10:8098/yz >>> >>> I created the index with: >>> >>> $ curl -i http://192.168.1.10:8098/yz/index/allLogs >>> >>> HTTP/1.1 200 OK >>> Server: MochiWeb/1.1 WebMachine/1.10.5 (jokes are better explained) >>> Date: Tue, 26 Nov 2013 22:51:15 GMT >>> >>> Content-Type: application/json >>> Content-Length: 41 >>> >>> {"name":"allLogs","schema":"_yz_default"} >>> >>> >>> And associated the search to the bucket probs: >>> >>> http://192.168.1.10:8098/buckets/logs/props >>> >>> { >>> >>> props: >>> { >>> >>> allow_mult: true, >>> basic_quorum: false, >>> big_vclock: 50, >>> chash_keyfun: >>> { >>> >>> mod: "riak_core_util", >>> fun: "chash_std_keyfun" >>> >>> }, >>> dw: "quorum", >>> last_write_wins: false, >>> linkfun: >>> { >>> >>> mod: "riak_kv_wm_link_walker", >>> fun: "mapreduce_linkfun" >>> >>> }, >>> n_val: 3, >>> name: "logs", >>> notfound_ok: true, >>> old_vclock: 86400, >>> postcommit: [ ], >>> pr: 0, >>> precommit: [ ], >>> pw: 0, >>> r: "quorum", >>> rw: "quorum", >>> small_vclock: 50, >>> w: "quorum", >>> young_vclock: 20, >>> yz_index: "allLogs" >>> >>> } >>> >>> } >>> >>> I put in a text/plain entry with: >>> >>> >>> http://192.168.1.10:8098/riak/logs/26-11-2013T2260?vtag=47ffPuWSln7VhlTl02raJA >>> >>> [2013-11-26T22:43:26] [ERROR] [192.168.1.102] [0] [ >>> [email protected]] test >>> >>> >>> http://192.168.1.10:8098/riak/logs/26-11-2013T2260?vtag=6IYwwPE27eUbs8ThaSOcTC >>> >>> [2013-11-26T22:39:59] [ERROR] [192.168.1.102] [0] [ >>> [email protected]] test >>> >>> >>> >>> But when I search: >>> >>> http://192.168.1.10:8098/search/allLogs?q=* >>> >>> No results >>> >>> http://192.168.1.10:8098/search/allLogs?q=test >>> >>> No results >>> >>> >>> Whats going on? >>> >>> >>> >>> >>> >>> >>> >>> >>> On Thu, Nov 21, 2013 at 12:45 PM, Ryan Zezeski <[email protected]> >>> wrote: >>> > >>> > >>> > >>> > >>> > On Wed, Nov 20, 2013 at 3:48 PM, Kartik Thakore <[email protected]> >>> wrote: >>> >> >>> >> Thank you. >>> >> >>> >> I am creating indexes with: >>> >> >>> >> curl -i -XPUT http://192.168.1.10:8098/yz/index/allLogs \ >>> >> -H 'content-type: application/json' \ >>> >> -d '{"schema" : "_yz_default", "bucket" : "logs" }' >>> >> >>> >> >>> >> But when I check the index with: >>> >> >>> >> curl -i http://192.168.1.10:8098/yz/index/allLogs >>> >> >>> >> It drops the bucket association >>> >> >>> >> HTTP/1.1 200 OK >>> >> Server: MochiWeb/1.1 WebMachine/1.10.5 (jokes are better explained) >>> >> Date: Wed, 20 Nov 2013 20:45:21 GMT >>> >> Content-Type: application/json >>> >> Content-Length: 41 >>> >> >>> >> {"name":"allLogs","schema":"_yz_default"} >>> > >>> > >>> > Sorry, that documentation is out of date. >>> > >>> > To associate an index to a bucket you need to set the bucket's >>> properties. >>> > >>> > curl -XPUT -H 'content-type: application/json' ' >>> http://localhost:8098/buckets/logs/props' -d >>> '{"props":{"yz_index":"allLogs"}}' >>> > >>> > You can perform a GET on that same resource to check the yz_index >>> property is set. >>> > >>> >> >>> >> Also >>> >> >>> >> what is going on here >>> >> >>> >> curl -XPUT -H'content-type:application/json' >>> http://localhost:8098/buckets/people/keys/me \ >>> >> -d'{ "name_s" : "kartik" }' >>> >> >>> >> Why not: >>> >> curl -XPUT -H'content-type:application/json' >>> http://localhost:8098/rial/people/me \ >>> >> -d'{ "name_s" : "kartik" }' >>> > >>> > >>> > >>> > In Riak 1.0.0 we changed the resource from '/riak/<bucket>/<key>' to >>> '/buckets/<bucket>/keys/<key>'. We were supposed to deprecate and >>> eventually remove the old resource but we never did. You can still use the >>> old style but I would recommend using the new style as it is what we use in >>> official docs and there is a chance perhaps the old resources don't stay up >>> to date with the latest features. >>> > >>> > >>> > -Z >>> >> >> > >
_______________________________________________ riak-users mailing list [email protected] http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
