Skip to content

Commit

Permalink
integrating changes from Marty, changing go import to original. Curio…
Browse files Browse the repository at this point in the history
…us what is the correct way to fork go code
  • Loading branch information
mattbaird committed Oct 31, 2012
1 parent 3e00cc8 commit 92fedd0
Show file tree
Hide file tree
Showing 19 changed files with 28 additions and 33 deletions.
6 changes: 3 additions & 3 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ package main

import (
"encoding/json"
"github.com/mschoch/elastigo/cluster"
"github.com/mschoch/elastigo/core"
"github.com/mschoch/elastigo/indices"
"github.com/mattbaird/elastigo/cluster"
"github.com/mattbaird/elastigo/core"
"github.com/mattbaird/elastigo/indices"
"log"
)

Expand Down
2 changes: 1 addition & 1 deletion cluster/clusterReroute.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"encoding/json"
"errors"
"fmt"
"github.com/mschoch/elastigo/api"
"github.com/mattbaird/elastigo/api"
)

// The cluster health API allows to get a very simple status on the health of the cluster.
Expand Down
2 changes: 1 addition & 1 deletion cluster/health.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package cluster
import (
"encoding/json"
"fmt"
"github.com/mschoch/elastigo/api"
"github.com/mattbaird/elastigo/api"
"strings"
)

Expand Down
2 changes: 1 addition & 1 deletion cluster/state.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package cluster

import (
"github.com/mschoch/elastigo/api"
"github.com/mattbaird/elastigo/api"
)

// http://www.elasticsearch.org/guide/reference/api/admin-cluster-update-settings.html
Expand Down
2 changes: 1 addition & 1 deletion core/count.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package core
import (
"encoding/json"
"fmt"
"github.com/mschoch/elastigo/api"
"github.com/mattbaird/elastigo/api"
)

type CountResponse struct {
Expand Down
2 changes: 1 addition & 1 deletion core/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package core
import (
"encoding/json"
"fmt"
"github.com/mschoch/elastigo/api"
"github.com/mattbaird/elastigo/api"
)

// The delete API allows to delete a typed JSON document from a specific index based on its id.
Expand Down
2 changes: 1 addition & 1 deletion core/deleteByQuery.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package core
import (
"encoding/json"
"fmt"
"github.com/mschoch/elastigo/api"
"github.com/mattbaird/elastigo/api"
"strings"
)

Expand Down
2 changes: 1 addition & 1 deletion core/explain.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package core
import (
"encoding/json"
"fmt"
"github.com/mschoch/elastigo/api"
"github.com/mattbaird/elastigo/api"
)

// The explain api computes a score explanation for a query and a specific document.
Expand Down
2 changes: 1 addition & 1 deletion core/get.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package core
import (
"encoding/json"
"fmt"
"github.com/mschoch/elastigo/api"
"github.com/mattbaird/elastigo/api"
)

// The get API allows to get a typed JSON document from the index based on its id.
Expand Down
2 changes: 1 addition & 1 deletion core/index.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package core
import (
"encoding/json"
"fmt"
"github.com/mschoch/elastigo/api"
"github.com/mattbaird/elastigo/api"
)

// The index API adds or updates a typed JSON document in a specific index, making it searchable.
Expand Down
2 changes: 1 addition & 1 deletion core/mget.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package core
import (
"encoding/json"
"fmt"
"github.com/mschoch/elastigo/api"
"github.com/mattbaird/elastigo/api"
)

// Multi GET API allows to get multiple documents based on an index, type (optional) and id (and possibly routing).
Expand Down
2 changes: 1 addition & 1 deletion core/moreLikeThis.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package core
import (
"encoding/json"
"fmt"
"github.com/mschoch/elastigo/api"
"github.com/mattbaird/elastigo/api"
)

// The more like this (mlt) API allows to get documents that are “like” a specified document.
Expand Down
2 changes: 1 addition & 1 deletion core/percolate.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package core
import (
"encoding/json"
"fmt"
"github.com/mschoch/elastigo/api"
"github.com/mattbaird/elastigo/api"
)

// The percolator allows to register queries against an index, and then send percolate requests which include a doc, and
Expand Down
21 changes: 8 additions & 13 deletions core/search.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package core
import (
"encoding/json"
"fmt"
"github.com/mschoch/elastigo/api"
"github.com/mattbaird/elastigo/api"
)

// Performs a very basic search on an index via the request URI API.
Expand Down Expand Up @@ -51,25 +51,20 @@ func Scroll(pretty bool, scroll_id string, scroll string) (SearchResult, error)
}

type SearchResult struct {
Took int `json:"took"`
TimedOut bool `json:"timed_out"`
ShardStatus api.Status `json:"_shards"`
Hits Hits `json:"hits"`
Facets json.RawMessage `json:"facets,omitempty"` // structure varies on query
ScrollId string `json:"_scroll_id,omitempty"`
Took int `json:"took"`
TimedOut bool `json:"timed_out"`
ShardStatus api.Status `json:"_shards"`
Hits Hits `json:"hits"`
Facets json.RawMessage `json:"facets,omitempty"` // structure varies on query
ScrollId string `json:"_scroll_id,omitempty"`
}

type Hits struct {
Total int `json:"total"`
MaxScore float32 `json:"max_score"`
Hits []Hit `json:"hits"`
Total int `json:"total"`
// MaxScore float32 `json:"max_score"`
Hits []Hit `json:"hits"`
Total int `json:"total"`
MaxScore float32 `json:"max_score,omitempty"`
Hits []Hit `json:"hits"`
}

type Hit struct {
Index string `json:"_index"`
Type string `json:"_type,omitempty"`
Expand Down
2 changes: 1 addition & 1 deletion core/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package core
import (
"encoding/json"
"fmt"
"github.com/mschoch/elastigo/api"
"github.com/mattbaird/elastigo/api"
)

// The update API allows to update a document based on a script provided. The operation gets the document
Expand Down
2 changes: 1 addition & 1 deletion core/validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package core
import (
"encoding/json"
"fmt"
"github.com/mschoch/elastigo/api"
"github.com/mattbaird/elastigo/api"
)

// The validate API allows a user to validate a potentially expensive query without executing it.
Expand Down
2 changes: 1 addition & 1 deletion indices/flush.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package indices
import (
"encoding/json"
"fmt"
"github.com/mschoch/elastigo/api"
"github.com/mattbaird/elastigo/api"
)

// The flush API allows to flush one or more indices through an API. The flush process of an index basically
Expand Down
2 changes: 1 addition & 1 deletion indices/refresh.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package indices
import (
"encoding/json"
"fmt"
"github.com/mschoch/elastigo/api"
"github.com/mattbaird/elastigo/api"
"strings"
)

Expand Down
2 changes: 1 addition & 1 deletion indices/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package indices
import (
"encoding/json"
"fmt"
"github.com/mschoch/elastigo/api"
"github.com/mattbaird/elastigo/api"
"strings"
)

Expand Down

0 comments on commit 92fedd0

Please sign in to comment.