This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// delete the index | |
curl -XDELETE 'http://localhost:9200/test/' | |
// create index | |
curl -XPUT 'http://localhost:9200/test/' -d ' | |
{ | |
index : { | |
number_of_shards : 5, | |
number_of_replicas : 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[2010-12-21 15:15:46,708][DEBUG][action.search.type ] [Oracle] [redflag][14], node[BIjCua6SR8CUaN6YRSKruw], [P], s[STARTED]: Failed to execute [org.elasticsearch.action.search.SearchRequest@704c98f1] | |
java.lang.ArrayIndexOutOfBoundsException: 549 | |
at org.elasticsearch.common.Unicode.UTF8toUTF16(Unicode.java:188) | |
at org.elasticsearch.common.Unicode.unsafeFromBytesAsUtf16(Unicode.java:104) | |
at org.elasticsearch.common.Unicode.fromBytes(Unicode.java:78) | |
at org.elasticsearch.search.SearchService.parseSource(SearchService.java:416) | |
at org.elasticsearch.search.SearchService.createContext(SearchService.java:335) | |
at org.elasticsearch.search.SearchService.executeDfsPhase(SearchService.java:153) | |
at org.elasticsearch.search.action.SearchServiceTransportAction.sendExecuteDfs(SearchServiceTransportAction.java:101) | |
at org.elasticsearch.action.search.type.TransportSearchDfsQueryThenFetchAction$AsyncAction.sendExecuteFirstPhase(TransportSearchDfsQueryThenFetchAction.java:82) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public interface VendorQueryCallback extends ClientCallback<SearchResponse>{ | |
ActionFuture<SearchResponse> execute(final Client client); | |
} | |
public class VendorQueryCallbackImpl implements VendorQueryCallback { | |
private final VendorSearchQuery query; | |
public VendorQueryCallbackImpl(VendorSearchQuery query) { | |
this.query = query; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git diff origin/master.. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package adt.reflexam.common.collect; | |
public class Tuple<V1, V2> { | |
public static <V1, V2> Tuple<V1, V2> tuple(V1 v1, V2 v2) { | |
return new Tuple<V1, V2>(v1, v2); | |
} | |
private final V1 v1; | |
private final V2 v2; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
As of 8/25/2011 | |
reflex-am-web: | |
------------------------------------------------------------------------------- | |
Language files blank comment code | |
------------------------------------------------------------------------------- | |
Javascript 58 3824 3646 17015 | |
CSS 27 2500 1506 16215 | |
HTML 136 1777 839 15612 | |
Java 155 2000 600 6581 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public User createUser(Account account, User user) { | |
account.addUser(user); | |
save(account); | |
//TODO - announce UserCreatedEvent | |
//TODO - move to listener | |
ObjectIdentity oid = new ObjectIdentityImpl(account); | |
securityService.createPermission(oid, new PrincipalSid(user.getUsername()), BasePermission.READ); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static final String DOT = "."; | |
public static DatabaseVersion valueOf(String string) { | |
DatabaseVersion version; | |
if(StringUtils.contains(string, DOT)) { | |
String[] versionParts = StringUtils.split(string, DOT); | |
if(versionParts.length != 2) { | |
throw new IllegalArgumentException("Could not parse version number '" + string + "'"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create table users_phone_number (users_id int8 not null, phone_numbers_id int8 not null, phone_order int8 not null, primary key (users_id, phone_numbers_id)); | |
alter table users_phone_number add constraint FKUSERPHONEUSER foreign key (users_id) references users; | |
alter table users_phone_number add constraint FKUSERPHONEPHONE foreign key (phone_numbers_id) references phone_number; | |
@OneToMany(cascade = CascadeType.ALL) | |
@OrderColumn(name = "phone_order") | |
public List<PhoneNumber> getPhoneNumbers() { | |
return phoneNumbers; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Multimaps.newListMultimap(new HashMap<String, Collection<String>>(), new Supplier<List<String>>() { | |
@Override | |
public List<String> get() { | |
return new ArrayList<String>(); | |
} | |
}); |
OlderNewer